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

  • Tools
    • DataHub
    • Shell
    • R

  • Problem Sets
    • PS 1
  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

  1. Go to CRAN, the Comprehensive R Archive Network.
  2. Choose your operating system:
    • macOS: download the .pkg installer and open it.
    • Windows: click base, download the installer, and run it.
  3. Accept the defaults during installation.

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.