Skip main navigation

How to Install R

R installation procedures for Mac, Windows and Linux users
© Wellcome Genome Campus Advanced Courses and Scientific Conferences
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 X 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.0.3 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 RStudio (or go directly to https://rstudio.com/products/rstudio/#rstudio-desktop)
  3. Click on the Download RStudio Desktop blue button in the Open Source Edition
RStudio Desktop screen 4. Download the most suited RStudio Desktop to your OS (Mac, Linux or Windows) installer RStudio screen 5. Open the file and follow the recommended instructions for installation

Discussion

Please use the comments section below to discuss any problems you encounter – facilitators on this course will be checking your comments and some of your fellow learners might be able to help as well.
© Wellcome Genome Campus Advanced Courses and Scientific Conferences
This article is from the free online

Bioinformatics for Biologists: An Introduction to Linux, Bash Scripting, and R

Created by
FutureLearn - Learning For Life

Our purpose is to transform access to education.

We offer a diverse selection of courses from leading universities and cultural institutions from around the world. These are delivered one step at a time, and are accessible on mobile, tablet and desktop, so you can fit learning around your life.

We believe learning should be an enjoyable, social experience, so our courses offer the opportunity to discuss what you’re learning with others as you go, helping you make fresh discoveries and form new ideas.
You can unlock new opportunities with unlimited access to hundreds of online short courses for a year by subscribing to our Unlimited package. Build your knowledge with top universities and organisations.

Learn more about how FutureLearn is transforming access to education