I am using Ubuntu 16.04. I want to install R (latest version) on it. As the system version is older, it can't find this version from terminal line. I checked it with this command on the terminal line.
sudo apt-get install r-base=3.6.1
Which resulted in -
Version '3.6.1' for 'r-base' was not found
I want to install this version with all it's packages. What is the correct process? Can I get all the package files and installation files to install all of it in one go from my terminal? Please suggest me an appropriate way of achieving this.
To install R 3.6 (3.6.1 specifically) on Ubuntu 16.04, you need to add the r-cloud project repo to
/etc/apt/sources.list
file.To do that, run the following commands:
If you want to install another version, you need to build it from source then add the executables and libraries to your PATH and LD_LIBRARY_PATH. You can get the source code from here.
Credit: How to install R 3.5.1 on Ubuntu 16 with apt-get?
Edit: I am not sure how packages are managed in R. But I think that essential packages will be installed with R and if you want a specific package you need to install it using R package manager.
To install a package named 'foo' for example, run
sudo -i R
to open the R console then runinstall.packages("foo")
.For more details about which packages are installed and how to install additional packages check the R README page