2021 January 21,

Math 240: R Instructions

Carleton College, Winter 2021, Joshua R. Davis, , Anderson 238, x4095

Introduction

R is a free software system for doing computations in probability and statistics. Although R can be used on its own, it's more pleasant to use with RStudio. RStudio is another piece of free software, that provides a user interface for keeping your R work organized and understandable.

In Math 240, we use R for calculations, examples, and simulations. To help you learn the basics of R, I spend about one day of class time going through tutorials with you. I also provide R files throughout the course, in case you want to follow along with some of my demonstrations.

Learning R is not a goal of this course. I'm not going to test you on your R skills, for example. But learning a little bit of R can make your course work easier.

There are two ways for you to access R/RStudio: via a web browser, or by installing it on your own computer.

First Way: Via a Web Browser

If you are off campus, then you need to access Carleton's computer infrastructure through Carleton's VPN (virtual private network). Maybe you already have this tool installed on your computer. If not, then install it following these directions.

Once you are on campus — either literally or through the VPN — go to https://maize.mathcs.carleton.edu/ and sign in using your usual Carleton credentials. An RStudio window should pop up in your web browser.

Second Way: Installing on Your Own Computer

Download and install R from the R Project. Then download and install RStudio from RStudio.

Once both pieces are installed, launch the RStudio application.

Either Way: Test Your Setup

Download my tutorial lab.R to your computer.

If you are using R/RStudio through a web browser, then find the Files pane, which is probably in the lower right corner of the RStudio window. Click the Upload button to upload lab.R from your computer to the server where RStudio is running. Then it should appear in the Files pane. Click it to open it in RStudio.

If you have installed R/RStudio on your own computer, then double-click the file to open it in RStudio. If that doesn't work, then go into the RStudio application, then to its File menu, and open the file there.

More Information

If you like, visit the Math/Stats Department's R/RStudio resources. You can see the schedule for lab assistants, read tutorials, etc.