Installing R and RStudio
1. Installing R
Depending on your operating system, follow the instruction below.
a. Windows
Visit [Link] and click on “Download R 3.6.0 for
Windows” in the upper left corner. Save the [Link] installer in your Downloads
directory (or any other location of your choice on your computer). Once the download has
finished, double click the file. If asked if you want to run the software and/or if you are
allowing the app to make changes to your computer click “Run” and/or “Yes”. Select the
language to be used in the installation (English is the default). Read the information provided
and keep clicking “Next” on the following screens to keep all the default settings. Wait for
the installation to finish. Proceed to the “Install RStudio” section below.
b. Mac OS X
Visit [Link] and click on “[Link]” on the left side of the
page. Wait for the installer to download, then click on it and click the “Continue” button
until prompted to agree to the terms and conditions. Read the terms and conditions and
click the “Agree” button. Then click the “Install” button. If prompted to log in to complete
the installation, insert your computer username and password, and click “Install Software”.
When installation finishes, proceed to the “Install RStudio” section below.
c. Linux
Use the following command to install R-Base:
sudo apt-get install r-base
typing “y” if prompted along the way. Wait for the installer to finish and proceed to the
Install RStudio section below.
2. Installing RStudio
Visit [Link] and click the installer
that corresponds to your operating system to download RStudio Desktop. Wait for the installer
to download, then click on it to proceed with the installation, clicking “Next”/“Keep” and
“Install” along the way if prompted. Wait for the installer to finish.
3. Opening RStudio and installing packages
Once installed open RStudio and select the install packages option from the tools menu in the
upper toolbar. In the install packages window type ‘tidyverse knitr rmarkdown’ and ensure the
install dependencies box is checked. Select install from the Repository (CRAN), and install to the
default library as shown in the screenshot below. Then click install
If prompted to choose a CRAN mirror select one which is close by (we find the China Guangzhou
works well in Ulaanbaatar).
R will then download the packages from the repository and install them on your system. This may
take some time depending on your internet connection.
4. Testing
You should now have both R and RStudio installed among your programs/applications. To test if the
installation was successful, start RStudio by either clicking on the shortcut created or searching for it
in your programs/applications list/search box. Once opened, RStudio should look similar to the
image below. In the “Console” window, type:
1+sqrt(4)
And click enter. R will compute and display the answer for you. In this case, 3. If this doesn’t work
properly then let us know on arrival and we will be able to offer support.