R, RStudio, and GitHub Desktop

R/RStudio

I expect you to use RStudio to run R in this course. If you have taken STAT 120 or another STAT course, you have likely encountered and perhaps even used the Maize server. For STAT 220, I highly encourage you to not use the Maize server and instead download your own version of R and RStudio. There are many reasons why your own version will be preferable for this class, but to list a few:

  • the computational needs for this class may at times (especially later in the term) collectively exceed what the Maize server can handle
  • part of this course will involve using Git and GitHub, and for beginners (and even more advanced users!) I believe using a Git client is easier
  • you don’t have to have internet access or be on campus/VPN into campus to access RStudio

That said, if you do not have a personal computer or if yours is particularly old and slow (I’ve done plenty of R coding on $250, 5+ year old laptops, so this likely will not impact you), then the Maize server is a great option. If you think your computer will not be up to the task for this class, skip to the Maize section of this page and follow those instructions.

Downloading R and RStudio

You must download both R and RStudio. To do so, visit the sites below. Use the default download and install options for each, and make sure you are selecting the appropriate download for your operating system (Windows or MacOS).

If you have R and RStudio on your computer already, make sure that you have recently updated both.

To check your version of R, run the command getRversion() and compare your version to the newest version posted on https://cran.r-project.org/.

In RStudio, check for updates with the menu option Help > Check for updates.

If you need to update either R or RStudio, then simply download a fresh version following the download links at the beginning of this section.


Git and GitHub

GitHub is a cloud-based service for hosting git projects. It allows multiple users to share and contribute to projects and it is how you will be submitting homework assignments and projects for this class.

If you are using a local install of R/RStudio, then you will need to install GitHub Desktop for this class.

Before you do that, though, create a GitHub account at https://github.com/.

Installing GitHub Desktop and Setup

GitHub Desktop is a Git client, which allows you to perform Git commands using a GUI instead of the command line. You can click the green “Download now” button at that link to download and install GitHub Desktop.

Once you have installed GitHub Desktop, you can learn more about setting it up here: https://docs.github.com/en/desktop/overview/getting-started-with-github-desktop.


LaTeX

When using your own local version of R and RStudio, you need a LaTeX compiler to create a pdf document from a R Markdown or Quarto file.

Installing LaTeX (not needed if you are using the maize server)

If you don’t already have a tex package installed on your computer, the easiest option to create pdf’s is to use the tinytex R package. This can be installed with the following R commands (simply run them in the RStudio console):

install.packages("tinytex")
tinytex::install_tinytex()  # install TinyTeX

Maize

We have a Carleton server hosting Rstudio at https://maize.mathcs.carleton.edu/. Your files on this account will be accessible as long as you are a student at Carleton. Use your Carleton credentials to access your account, and you need to either be on campus or use the Carleton VPN if not to use this server.

VPN

If you use the Maize server and plan to do work off campus, you will need to use the Carleton VPN.

To install the GlobalProtect VPN follow directions provided by ITS.

Git and LaTeX

You do not need to install Git or LaTeX if you use the Maize server, as these are already on campus computers. You can, by default, create pdf files from R Markdown or Quarto files when using the Maize server. However, you will not be able to use GitHub Desktop and will instead need to use Git at the command line. See the Command Line Git page on this website.