You need to install and test R and RStudio before the workshop. The installation process is simple on all major platforms, and mostly consists of downloading and running the installers appropriate to your platform. Please contact the instructors if you run into difficulties so we can help you show up with a computer properly set up for the workshop.

R and RStudio

Testing testing

  1. Do whatever is appropriate for your OS to launch RStudio. You should get a window similar to the screenshot below.
    • If you don’t see a window that is divided into distinct areas labelled “Console”, “Environment”, etc., you are probably running the user interface that comes bundled with R. Check that RStudio is present in your applications and start it instead.

 

  1. Put your cursor in the left pane labelled “Console”, which is where you interact with the live R process. Create a simple object with code like x <- 2 * 4 (followed by enter or return). In the “Environment” pane, to the right of the Console, you should see an entry for “x” with appropriate value (in this case, 8).

  2. Then inspect the x object by typing x in the Console followed by enter or return. You should see the value 8 printed to the screen.

  3. Finally, check that plotting works. In the console, type plot(cars). If you see a scatterplot appear in the “Plots” pane to the lower right, you are good to go.

Add-on packages

R is an extensible system and many people share useful code they have developed as a package via the Comprehensive R Archive Network CRAN, Bioconductor, or personal GitHub repositories.

To install a package in RStudio:

  1. Go to the “Tools” menu and choose “Install Packages” or click “Install” in the Packages area in the lower right pane of RStudio.
  2. The following window appears

 

  1. Enter the name of the desired package
    • The checkmark by “Install dependencies” should be on.
  2. Click on the “Install” button

Please install the following packages and their dependencies for use in this workshop:

Further resources

The above is sufficient preparation for this workship but here are some links if you are interested in reading a bit further.