Lesson 1. Install & set up R and RStudio on your computer


Set up R, RStudio and your working directory - Earth analytics course module

Welcome to the first lesson in the Set up R, RStudio and your working directory module. This module walks you through getting R and RStudio set up on your laptop. It also introduces file organization strategies.

R & RStudio setup

In this tutorial, we will download and install R & RStudio on your computer. The R & RStudio installation instructions below were adapted from Software Carpentry.

Learning objectives

At the end of this activity, you will:

  • Be able to download and install R and Rstudio on your laptop

Windows

Once R and RStudio are installed, open RStudio to make sure that you don’t get any error messages.

Mac OS X

  • Go to CRAN and click on Download R for (Mac) OS X
  • Select the .pkg file for the version of OS X that you have and the file will download
  • Double click on the file that was downloaded and R will install
  • Go to the RStudio Download page
  • Under Installers select RStudio current version ## - Mac OS X 10.6+ (64-bit) to download it.
  • Once it’s downloaded, double click the file to install it.

Once R and RStudio are installed, open RStudio to make sure it works and you don’t get any error messages.

Linux

R is available through most Linux package managers. You can download the binary files for your distribution from CRAN. Or you can use your package manager (e.g. for Debian/Ubuntu run sudo apt-get install r-base and for Fedora run sudo yum install R).

  • To install RStudio, go to the RStudio Download page
  • Under Installers select the version for your distribution.
  • Once it’s downloaded, double click the file to install it.

Once R and RStudio are installed, open RStudio to make sure that it works and there are no errors when you open it.

Leave a Comment