I am trying to install the latest version of R into Ubuntu 16.04.
But somehow it installs 3.4.4 even though latest version of R is 3.6.1. I have also read some articles that state "To obtain the latest R 3.6 packages, add an entry like":
deb https://cloud.r-project.org/bin/linux/ubuntu disco-cran35/
But still I don't understand what should I do with this link.
Best Answer
First, remove the installed version of R using:
You should also uninstall any other R packages that you may have installed.
As stated in the R installation guide, for 16.04 you need to add the repository
deb https://cloud.r-project.org/bin/linux/ubuntu xenial-cran35/
to/etc/apt/sources.list
. There is a longer and a shorter way to do this.Longer way: To add the repository open a terminal and run
Copy and paste
deb https://cloud.r-project.org/bin/linux/ubuntu xenial-cran35/
at the end of the file (paste is Ctrl+Shift+V for nano).Then add the public key for the repository running the following command:
Finally, update your system to enable the repository:
Shorter way: You can add the repository, key and update as an one-line terminal command:
Now you should be able to install R 3.6 by running: