Instructions For Installing R and RStudio
Instructions For Installing R and RStudio
integrated development environment (IDE) installed on your machine, unless you have
access to an online RStudio server instance through your university (check with your IT
department).
Below we provide instructions for installing R and RStudio locally. On a typical machine,
these steps are straightforward and shouldn’t take more than 30 mins to complete.
If you run into problems, check this quick troubleshooting guide in the first instance:
https://brouwern.github.io/getRdone/troubleshooting-r-rstudio-installation.html, as well as
links provided in Section 3 (“Further reading”) below.
1. Installing R
• Go to https://cran.r-project.org/.
• At the top of the site you will see links to download precompiled binary distributions.
Choose the one for your platform.
• Depending on the platform, there may be further options to choose from on the
page that will appear.
• For Windows, click on the link “Install R for the first time”:
• For MacOS, you’ll need to choose the correct package depending on the
operating system and processor architecture of your machine:
• For various Linux distributions, you’ll find instructions to install R using your
operating system’s package manager (note you’ll need sudo permissions):
• Tip: If the download progresses slowly, you can try one of the mirror sites listed
here: https://cran.r-project.org/mirrors.html.
2. Installing RStudio
• If you have a Windows machine, you’ll find an installation link right there
(see above). Otherwise, scroll further down for platform-specific links:
• Click on the relevant link and follow installation instructions (which are straightforward).
• Once RStudio is installed, start it and create a new R Notebook (or open the file
“Data analysis notebook.Rmd” from Resources straight away).
• RStudio will ask you to install several packages. Depending on the operating system,
you may see something like:
• Note that in recent RStudio versions there are two modes for editing R notebooks.
We recommend switching in the “Visual” mode as your notebook will look prettier
and more readable this way:
• Finally, also note that RStudio will also need to install additional packages to
generate the HTML report from your notebook (as will be explained at the end of the
notebook). If you would like to have these packages installed before proceeding with
the task, you can “knit” the HTML report from a fresh notebook right away by clicking
on the “Preview” drop-down menu and then on “Knit to HTML.”
3. Further reading
This document and the “Analysis notebook.Rmd” file in Resources should provide sufficient
details for you to complete the task. However, if you are interested in learning more, you
might find these links helpful:
• Another free online R book is here: https://intro2r.com/, and it also has instructions on
installing R and RStudio (https://intro2r.com/installing-rstudio.html).
• The RStudio education pages have links to lots more learning resources:
https://education.rstudio.com/learn/beginner/.