Installing R is easy. Simply go to https://cloud.r-project.org/ and download the appropriate version of R depending on your operating system:
ubuntu/
), and then follow the instructions specific to that distribution.
After you’re done installing R, it’s time to install R Studio. Simply go to https://rstudio.com/products/rstudio/download/#download and pick a suitable version for R Studio depending on your operating system. Download and install it.
To proceed, open R Studio and do the following:
File -> New Project
), name it dataviz
, stae04
, (or whatever you feel like), and save it to a folder somewhere on your hard drive. This will be where you store all your work on the course.data
folder in that project.Ctrl/CMD + Shift + N
) and save it inside your project folder. (If you are moving through the course material in order, you may want to name it worked_example_r.R
or something along those lines.)3 + 1
and mean(c(1, 3, 5))
.Ctrl/CMD + Enter
.There are a lot of settings in R Studio. Most of the defaults are fine, but there is at least one setting we recommend that you alter straight away. Go to Tools -> Global Options
and un-check “Restore .RData into workspace at startup” and select “never” for “Save workspace to .Rdata on exit”.