How to Install R on Ubuntu
Install R from Ubuntu repositories. The installation process is simple and requires only a few steps. However, since the default Ubuntu libraries are not updated as frequently as the CRAN repositories, there is a possibility of installing an older version of R.
To install R from the Ubuntu repository:
1. Open the terminal and update the apt package lists:
sudo apt update
2. Install the R base package and its dependencies using the following command:
sudo apt install r-base r-base-dev -y
The r-base-dev
package enables users to install new packages using the install.packages()
function within the R console.
3. Type R
and hit enter to verify that R has been installed:
R
You will get the following syntax!
ryan@ROGVB:~$ R
R version 4.1.2 (2021-11-01) -- "Bird Hippie"
Copyright (C) 2021 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
Natural language support but running in an English locale
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
Blog comments