Installing R

R is free and available for Windows, Mac, and Linux. This textbook requires R version 4.1 or later (for the native pipe operator |>).

Windows:

  1. Go to https://cran.r-project.org/bin/windows/base/
  2. Click “Download R for Windows”
  3. Open the downloaded file and follow the installer prompts
  4. Accept all default settings

Mac:

  1. Go to https://cran.r-project.org/bin/macosx/
  2. Click the .pkg file that matches your Mac (Apple Silicon or Intel)
  3. Open the downloaded file and follow the installer prompts
  4. Accept all default settings

To verify the installation, open a terminal (Mac) or command prompt (Windows) and type R --version. You should see the version number displayed.