-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path01-Rstudio.Rmd
More file actions
31 lines (18 loc) · 1.16 KB
/
01-Rstudio.Rmd
File metadata and controls
31 lines (18 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# RStudio
Open up RStudio, and it will look something like this:
```{r, out.width='90%', fig.align='center',echo=FALSE}
knitr::include_graphics(rep("images/rstudio.png"))
```
The different parts are:
1. The code editor. This is where you write code.
2. The R console. This is the R environment where R code is executed.
3. Workspace. The objects you create along the way will be listed here.
4. Plots and files. Plots will render here, and files can be browsed in the "Files" pane.
Before we start, we need to do a little prep.
1. On your computer, make a folder called "Rcourse1".
We then set the working directory to this folder, so
2. In RStudio go to Session > Set Working Directory > Choose Directory and find the "Rcourse1" folder and select it.
RStudio will now be looking for files in this folder, and any saved plots will be put here unless stated otherwise.
Now, go to File > New File > R Script
A new empty script will open up in the top left window. Go to File > Save and give it a name. It will be saved to you current working directory. You should see your file being added to the list in the Plot and Files pane.
Now that we've done our prep, let do some R.