R
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.
- Click Download R for macOS.
- Download the
.pkginstaller that matches your machine (Apple silicon or Intel). - Open the installer and accept the defaults.
- Click Download R for Windows, then base.
- Download the installer and run it.
- Accept the defaults.
Checking your installation
Open R (or a shell) and run:
R.version.stringYou 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.