This tutorial will go over some basics about programming in R. We hope that you’ll get a feel for what R can do as well as learn where you can learn more to use it on your own (great resources are listed at the end).

Getting Started with R

Although R is technically a programming language, it was developed specifically for analyzing data. It has many built-in tools for common analysis tasks, as well as countless more available for add-on that have been developed by the R community. Since it is a language, however, you are not limited to carrying out tasks or analyses that someone has already implemented. R is widely-used, free, and open-source with great community support.

Getting R/RStudio Set Up

If you haven’t already installed R and RStudio on your computer, please follow these instructions to get set up.

Installing R

To set up your own computer, the first step is to install R. You can download and install R from the Comprehensive R Archive Network (CRAN). It is relatively straightforward, but if you need further help you can try the following resources:

Installing RStudio

The next step is to install RStudio, a program for viewing and running R scripts. Technically you can run all the code shown here without installing RStudio, but we highly recommend this integrated development environment (IDE). Instructions are here and for Windows we have special instructions.

The Console

Now that you have opened up RStudio, you are ready to start working with data. Whichever approach you are using to interact with R, you should identify the console.