R Installation

If you are planning to do the R assignments on your own computer (recommended), then here is a quick outline for obtaining the software.

  • There are two separate software programs. Most people find it easier to use RStudio. than just R, but you need to install R first before installing RStudio (analogously speaking: you need an cell phone before you can use an cell phone case).
  • If you have R and RStudio from a previous course, you still need to update to the current versions! (version 3.6.2 of R and version 1.2.5033 of RStudio)

Downloading R

Go to The Comprehensive R Archive Network (CRAN)

Windows:

  • click “Download R for Windows”
  • click “install R for the first time”
  • click “Download R 3.6.2 for Windows”
  • click “Save File”

Mac:

  • click “Download R for (Mac) OS X”
  • click “R-3.6.2.pkg”
  • click “Ok”

Installing R

  • Windows: double-check icon for R-3.6.2-win.exe
  • Mac: double-click icon for R-3.6.2.pkg

For the rest of these steps, it is okay to accept the default selections (but I will outline them here for posterity):

  • give computer permission to install
  • select language
  • agree to GNU General Public License
  • select destination location
  • select components
  • Startup options: select “No (accept defaults)”
  • select Start Menu Folder
  • select Additional Tasks
  • (wait a minute or two for installation to take place)
  • “Click Finish to exit Setup”

Downloading RStudio

Go to the RStudio Desktop download page (i.e. we are using the free, desktop version of RStudio)

  • Windows: click RStudio-1.2.5033.exe, click “Save File”
  • Mac: click RStudio-1.2.5033.dmg, click “Ok”

Installing RStudio

  • Windows: double-check icon for RStudio-1.2.5033.exe
  • Mac: double-click icon for RStudio-1.2.5033.dmg

For the rest of these steps, it is okay to accept the default selections (but I will outline them here for posterity):

  • give computer permission to install
  • “Click Next to continue”
  • Choose Install Location
  • Choose Start Menu Folder
  • (wait a minute or two for installation to take place)
  • “Click Finish to close Setup”

Code Packages

For R coding, we will often need more code—called code packages. To ease our coding sessions, please run the following lines of code before class (in the lower-left console area of RStudio, just has to be done once this semester).

package_list <- c("tidyverse", "readxl", "mosaic", "titanic")
install.packages(package_list)

File Types

Also, while we are learning how I want homework assignments to be submitted, it will be useful if you can see file types in your computer.

Related