STAT 133
  1. Tools
  2. R
  • Home
  • Syllabus
  • Office Hours

  • Tools
    • DataHub
    • Shell
    • R
    • R App
    • Git
    • Positron

  • Projects
    • Sampson’s Monks
    • Zero Emission Vehicles

  • Problem Sets
    • PS 1
    • PS 2
    • PS 3
  1. Tools
  2. R

R

R logo

R is the programming language we use all semester for computing with data. On DataHub, R is already installed, but you will also want to install it on your own machine.

Installing R locally

Start at CRAN, the Comprehensive R Archive Network, then follow the steps for your operating system.

  • macOS
  • Windows
  1. Click Download R for macOS.
  2. Download the .pkg installer that matches your machine (Apple silicon or Intel).
  3. Open the installer and accept the defaults.
  1. Click Download R for Windows, then base.
  2. Download the installer and run it.
  3. Accept the defaults.

Checking your installation

Open R (or a shell) and run:

R.version.string

You should see the version of R you installed[^Fun fact: the unusual names of R versions come from snippets of text from the comic strip Peanuts.].

Launching R

To open R from a shell, just type the command R and press Enter. This will open R at the command line. To close R and return to the shell, run the function q() to quit.

 
  • License