Loading R and RStudio

For this series of exercises, you will need two programs on your computer, R and RStudio. Both of these are free programs, available to download without charge from the web.

Loading R on your computer

A list of sites where R can be downloaded is maintained at https://cran.r-project.org/mirrors.html —choose the site geographically nearest you. For Vancouver, for the best choice is https://cran.r-project.org/mirrors.html. From the top box, click on the link that matches your type of computer.

Macs -- If you have a Mac, you will likely first need to install XQuartz from https://www.xquartz.org. After it downloads, click on the .dmg file that appears in your downloads folder, and then form the folder that opens, click on the XQuartz.pkg file. Follow the installation instructions in the new window that opens.

To load R, choose the MacOS link from the CRAN website above. From the resulting page (called “R for Mac OS X”) choose the .pkg file that matches your version of the operating system – usually this is the first one. Download that package, click on the .pkg file once it has downloaded fully, and follow instructions on the screen.

Windows -- After choosing Windows from the CRAN page, click on the first link for labeled “base”. Then click on the large top link “Download R 4.X.X for Windows”. Run the .exe file that downloads.

Loading RStudio onto your computer

Go to https://www.rstudio.com/products/rstudio/download/ and choose the “DOWNLOAD” button under the left column for RStudio Desktop FREE. Then from the list of Installers, choose one that matches your operating system.

Mac – Open the .dmg file that downloads, and in the resulting window slide the RStudio icon into the Applications icon.

Windows – Run the .exe installer file that downloads.