Installation
Install R software from CRAN
Install RStudio
Andrew Heiss has on his blog install instructions for both Windows and OS X
Set-up
Set your CRAN mirror: preferences > packages
Set your theme and font: preferences > appearance
Set your pane layout: preferences > Pane Layout
In preferences > General, verify “save workspace on exit” set to
NEVER
Packages and Libraries
Try installing the dplyr
package:
install.packages("dplyr")
- There is also a drop-down menu under Tools > Install Packages
Load the dplyr
package from your computer into your RStudio workspace:
library(dplyr)
Getting Help for a package
Help file:
help(foo)
?foo ## ?? double question marks needed if package isn't loaded into library
Vignettes:
vignette() # this will show list of all vignettes
vignette(package = "dplyr") # vignettes included for a specific package
vignette("dplyr") # views vignette
Books and other resources
We will be following R for Data Science (abbreviated R4DS) which is free online but you can also buy the book if you prefer
Library has another good resources: Hands-on programming with R Garrett Grolemund
The tidyverse
We will be using a lot of packages in the tidyverse. Install or check for updates:
install.packages("tidyverse")
tidyverse_update()
Additional packages used in the R4DS book:
install.packages(c("nycflights13", "gapminder", "Lahman"))