This guide provides details and examples on using R to perform the kinds of statistical analyses that we'll use in STAT 255. You may use it as a template, as you write code for your assignments.

0.1 Installing R and RStudio

If you want to work with R from your own computer, you can install it for free using the directions below. This will allow you to work on your assignments whenever and wherever you would like.

0.1.1 Installing RStudio

  1. To install R, click the link.
  2. Choose the version appropriate for your system.

  1. Download R version 4.1.1.



  1. Install R version 4.1.1 on your computer.

0.1.2 Installing R Studio

  1. To install R Studio, click the link.
  2. Download the version of RStudio Desktop appropriate for you. This is suggested in step 2.

  1. Install RStudio on your computer.

The following chapters walk you through the important tasks you'll perform in this class. I will continue to add to this document as the course progresses.

0.1.3 Using R on Lawrence's Lab Computers

R is also installed in many computer labs on campus, including Briggs 421. If using R from a computer lab, be sure to work from the desktop version. Be aware that there is also a browser version of RStudio at Lawrence (, which you may have used in other classes. We will NOT use this version in this class. It is not updated as frequently, and is ill-equipped to handle the kind of computations we will need to perform in this class.