Malik Naik
Published in

Malik Naik

Installing latest version of R on the Ubuntu 20.04/18.04, and Linux Mint 19/20

To install the latest version of R on Ubuntu 20.04 Focal Fossa, or Linux Mint 20 Ulyana. Run the following commands:

$ sudo apt-key adv — keyserver keyserver.ubuntu.com — recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9

After running the above command add the apt repository for the R as follows:

$ sudo add-apt-repository ‘deb https://cloud.r-project.org/bin/linux/ubuntu focal-cran40/’

Once you’ve ran the above commands now it’s time to install the r-base and r-base-dev as follows:

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

The above command will install the latest version of R (R 4.0.3 at the time of writing this blog) and use can test it by running R command and you should see the output something like this:

$ RR version 4.0.5 (2021-03-31) -- "Shake and Throw"
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 localeR 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.
>

To install R on Ubuntu 18.04 Bionic Beaver, or Linux Mint 19 Tara. Run the following commands:

$ sudo apt-key adv — keyserver keyserver.ubuntu.com — recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9 
$ sudo add-apt-repository ‘deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran40/’
$ sudo apt-get update
$ sudo apt-get install r-base r-base-dev

That’s it. You’ve successfully installed the latest version of R on Ubuntu and Linux Mint. If you are facing any issues write them in the comment section below.

Cheers!

--

--

--

Here you’ll find blog about programming, system configuration, and best practices.

Recommended from Medium

[Resolved] Update Failed/Publish Failed in WordPress After SSL Installation

Helloworld with Go: Extra — Go HTTP Server Unit Testing

STEAM Fall 2018: Think Big, Start Small, Do More.

CSS for Beginner’s

Technical Design

Programming Is Like Sex

How to Download YouTube videos with Python?

Create Admin Panel with Laravel Backpack Part 4

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Malik Naik

Malik Naik

A Graduate student, Full-Stack Developer and open-source contributor.

More from Medium

Configure SSO In WSO2 EI 6.6.0 With Okta

Packaging and Release

ElastAlert 2 for OpenShift 4.9

California Multi-Stakeholder Response to Harmful Algal Bloom Monitoring