R is an open-source programming language mainly used by statisticians and data scientists to perform statistical analysis. It is great for statistical computing, with robust features for generating detailed statistical visualizations.
The R packages included in the default repositories are often outdated. We will install the latest R package from the CRAN repository.
New article — Lightweight Linux Distros perfect for older hardware.
How to Install R on Linux Distros (Debian, Fedora/Redhat, Ubuntu)
This guide covers the 4 specific ways to install R on Linux distributions.
- RAM— 1 GB required, 2 GB recommended.
- a non-root with sudo privileges on the user account.
1. Install R from the terminal
Type in the following commands in terminal.
sudo apt install dirmngr gnupg apt-transport-https ca-certificates software-properties-common
Add the CRAN repository to your system
sudo add-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu focal-cran40/'
Install R by typing
sudo apt install r-base
Verify the R version
2. Download via Homebrew
You can download R by typing a homebrew command:
brew install r
3. Download via XCode
Type the following command to install R through XCode:
4. Download R with the Web Browser
You can get the latest R package from cran.r-project.org
You are ready.