Installing R and R Studio
You will first install the base system for R and then install the RStudio, which provides a much more user-friendly interface.
Install the base system for R
In your browser go to https://cran.r-project.org/
Select Download R for Mac or for Windows
- For Mac: install R package based on your current operating system
- For Windows: click "install R for the first time"
Install RStudio
In your browser go to https://www.rstudio.com/products/rstudio/
- Click on "Download Rstudio Desktop"
- Select the appropriate R studio installer (Windows or MAC) and run the installation
Once the RStudio is installed, it will have several windows as shown in the image below.
The modules for this course have many examples of how to use R for specific tasks, and you will be using these from week to week. The examples embedded into each week's learning modules will provide you with all of the necessary instructions for using R in this course, and it shouldn't be necessary to seek other instruction. However, if you wish to learn more about R, here are links to additional resources.
Data Sets
All data sets used in PH717 are comma separated value (.csv) files. For example, in this session we will be importing two data set files:
.csv files are like spreadsheets, but are saved in a simpler format that makes it possible for R to read them. If we want to create our own data set, we could enter the data into an Excel spreadsheet and save it as a .csv using "Save as" to save it in a .CSV format.