Skip main navigation

New offer! Get 30% off one whole year of Unlimited learning. Subscribe for just £249.99 £174.99. New subscribers only. T&Cs apply

Find out more

Refresher step: How to Install and use R and RStudio

RStudio installation and user interface explained - links to prerequisite course

How to install R on different computers

Instructions for Mac Users:

  1. Open your internet browser and go to https://www.r-project.org/
  2. In the Getting Started section, follow the download R link available
  3. You will be redirected to a webpage asking you to choose your preferred CRAN (Comprehensive R Archive Network) mirror. You will have to choose the closest mirror to your current location
  4. Follow the Download R for mac OS link available
  5. Select the link containing the R version that is most suited to your Mac OS Version in order to download it (.pkg file)
  6. Open the file and follow the recommended instructions for installation
  7. To check whether the installation was successful: Open your Terminal, simply write R, and the available R version will be displayed to you automatically

Screen you get by invoking R in your terminal window

8. You might also need to install XQuartz if it is not part of your Mac OS Version. Please read carefully the available instructions (in this same webpage or consult the https://www.xquartz.org/ website) on how to install it. Select the link containing the XQuartz version that is most suited to your Mac OS Version in order to download it (.dmg file), then open the file and follow the recommended instructions for installation.

Instructions for Linux Users

  1. Open your internet browser to go to https://www.r-project.org/
  2. In the Getting Started section, follow the download R link
  3. You will be redirected to a webpage asking you to choose your preferred CRAN(Comprehensive R Archive Network) mirror. You will have to select the closest mirror to your current location
  4. Click on the Download R for Linux link
  5. Select your Linux OS system

Comprehensive R Archive Network mirror site screen

6. Follow carefully the installation instructions

7. Example for Ubuntu

To install the complete R system, use:

sudo apt-get update
sudo apt-get install r-base

Users who need to compile R packages from source [e.g. package maintainers, or anyone installing packages with install.packages()] should also install the r-base-dev package:

sudo apt-get install r-base-dev

8. To check whether the installation was successful:

  • Open your Terminal
  • write R
  • the available R version will be displayed to you automatically

Instructions for Windows Users

  1. Open your internet browser and go to https://www.r-project.org/
  2. In the Getting Started section, follow the download R link
  3. You will be redirected to a webpage asking you to choose your preferred CRAN (Comprehensive R Archive Network) mirror. You will have to select the closest mirror to your current location
  4. Click on the Download R for Windows link
  5. Click on the install R for the first time link
  6. This will open the following webpage

Comprehensive R Archive Network mirror site screen 7. You can directly click on Download R 4.1.1 for Windows

8. If you need more information on how to open and use R under windows, please click on the Installation and other instructions link (immediately under the first link) and read carefully the recommendations given to you.

How to install RStudio – Instructions for Mac, Linux and Windows Users

  1. Open your internet browser and go to https://www.rstudio.com
  2. Select the Products tab and go to RStudioIDE R studio main screen
  3. Alternatively, you can go directly to https://www.rstudio.com/products/rstudio/
  4. Click on the RStudio Desktop link under the Open Source Edition installer RStudio screen 5. Click on Download Rstudio under the Desktop Edition rstudio shot Then select to install R studio only if you followed the instructions to install R above, making sure its the right version for your operating system (Windows, Mac, Linux) rstudio shot 6. Open the file and follow the recommended instructions for installation

How to work with RStudio

By clicking to the links below, you will be re-directed to the prerequisite course, the first in our series Bioinfomatics for Biologists. You can watch the following screencasts prepared by Fatma for that course (once you have finished simply return to this step to continue with this course):

In this screencast, Fatma is explaining the RStudio interface

Watch this screencast by Fatma on beginning to use the RStudio, and try to follow along!

© Wellcome Connecting Science
This article is from the free online

Bioinformatics for Biologists: Analysing and Interpreting Genomics Datasets

Created by
FutureLearn - Learning For Life

Reach your personal and professional goals

Unlock access to hundreds of expert online courses and degrees from top universities and educators to gain accredited qualifications and professional CV-building certificates.

Join over 18 million learners to launch, switch or build upon your career, all at your own pace, across a wide range of topic areas.

Start Learning now