Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Install R latest verison on ubuntu 16.04

Tags:

r

ubuntu-16.04

So I tried to install R (after repairing ubuntu on my system) using following command :

sudo apt-get install r-base-core
sudo apt-get install r-recommended

It installs R 3.2 , but the latest version of R currently available to use is R 3.4, any idea why it is not installing R 3.4 ?

I lately installed R.3.4 manually, it works fine. just curious to know why it didn't installed at the first place using the command.

like image 546
minie Avatar asked Jun 15 '17 12:06

minie


People also ask

How can I install R in Ubuntu?

Download the key and install it: wget -qO- https://cloud.r-project.org/bin/linux/ubuntu/marutter_pubkey.asc | sudo gpg --dearmor -o /usr/share/keyrings/r-project. gpg. Next, add the R source list to the sources.

How do I update R version?

If you want to update R and RStudio: There, you can go to the “R” menu and click “Check for R Updates” (see image below). If you do that, R will tell you the current version you're on, and whether or not there is a more updated version that you can download (circled in blue).

Can you run R on Ubuntu?

Run R scripts with RStudio in Ubuntu The most common way to use R is using RStudio, a great cross-platform open source IDE. You can install it using deb file in Ubuntu.


2 Answers

Follow these steps:

  1. Add this entry deb https://cloud.r-project.org/bin/linux/ubuntu xenial/ to your /etc/apt/sources.list file.

  2. Run this command in shell: sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9.

  3. Update and install: sudo apt update; sudo apt install r-base.

I wrote a post that explains each step in detail (update: also covers installing R on Ubuntu 18.04); here's the link.

like image 123
NickZeng Avatar answered Nov 07 '22 06:11

NickZeng


It installs 3.2 because that's the default in the Ubuntu 16.04 repository. If you want the most up to date version of R for Ubuntu it's best to follow the instructions at the cran page for R on Ubuntu.

like image 43
Dason Avatar answered Nov 07 '22 05:11

Dason