R

R is a language for statistical computing and graphics. R's use in the data science and econometrics community has taken off over recent years and (at a bare minimum) should be considered as an open source replacement to Stata.

Department Managed Laptops

Once again, just go to the Software Center. On windows laptops just install R Studio since this will include R. On Mac, install R and RStudio individually.

Installing R for Mac Users

Go to the R homepage and download the installer for your operating system.

The current version for Mac and Windows is R version 4.3.1.

Once you have installed R, verify your install.

Why Not Install via Homebrew?

There are conflicting views on Homebrew's installation of R. Because we haven't tried it to ensure no problems will emerge, we recommend going with the installation based on the CRAN distributed package.

Installing R for Linux Users

First, we need to add a repository so that our operating system knows where to install the most recent version of R from.

Enter the following into the terminal and press Return:

wget -qO- https://cloud.r-project.org/bin/linux/ubuntu/marutter_pubkey.asc | sudo tee -a /etc/apt/trusted.gpg.d/cran_ubuntu_key.asc
sudo add-apt-repository "deb https://cloud.r-project.org/bin/linux/ubuntu $(lsb_release -cs)-cran40/"

Now, update to get the package manifests from the new repository:

sudo apt-get update

We can now install R as from the terminal by entering the following:

sudo apt-get install r-base r-base-dev

Install the multi-threaded OpenBlas library to get higher performance for linear algebra operations:

sudo apt-get install libopenblas-base

Now, verify your install.

Installing R for Windows Users

We are installing R with winget:

winget install -e --id RProject.R

Now, verify your install.

Verifying your Install of R

Open a terminal and enter:

R --version

followed by pressing Return. The expected return begins with:

R version 4.2.x (2022-xx-xx) -- "Some Funky Name"

Failure

If this verification doesnt work, R has not been added to your PATH. This is no problem for us. Just check whether RStudio works after installing it in the next step.