Skip to main content

Installing R on Ubuntu 19.10


Download R Source code from
https://cran.rstudio.com/index.html

extract the .tar.gz file to a location
gzip -dc R-x.y.z.tar.gz | tar -xf -

current sources for the recommended packages, which can be obtained by rsync or downloaded from CRAN. To use rsync to install the appropriate sources for the recommended packages, run ./tools/rsync-recommended from the top-level directory of the R sources.

Install necessary packages to add repository over HTTPS
sudo apt install apt-transport-https software-properties-common


Add CRAN external repository
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9
sudo add-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/'

edit /etc/apt/sources.list and remove comments for deb-src for line containing cran35/
(mostly last line of this file)

execute sudo apt-get update to read the sources files.

Install package dependencies using
sudo apt-get build-dep r-base

This step will download a tone of dependencies and may take some time

Now navigate to folder where R is extracted and execute
./configure --prefix=/opt/R/3.6.2 --enable-R-shlib --with-blas --with-lapack

This prepares a make file that installs R under /opt
blas enables to use system libraries rather than R internal libraries. It improves analytics calculation speed.

Output should look like something like this


Execute make comment to execute it
make

finally install it by 
sudo make install

you can optionally create a short cut for it using
sudo ln -s /opt/R/3.6.2/bin/R /bin/R



Comments

Popular posts from this blog

Upa Yoga

Pakistan

Watching recent tweets and news article in western media, I would like to spend some quality time and understand the enmity between India and Pakistan. In this pursuit, some interesting reads and my take a ways India-Pakistan partition - Birth of a country based on religion  Subsequent incidents Current states 9/11 Terrorist attacks and Intelligence war What wrong with Islam State of Pakistan and reasons for some of its troubles by a Pakistani 10-September - 2019 Pakistan Army begins operation in POK

Want your name to be in History books!! with little spare money, you can!!

It took great action like an innovation, blood shed etc., to have ones name recorded in Human history often backed by great purpose. Now you have such opportunity... naming a species after you, while conserving the nature. Rainforest Trust , a US-based nonprofit environmental organization, inviting bidders to name 8 animals and 4 Orchids, with all proceeds going towards environmental conversation. This Blue eyed  ECUADORIAN FROG  is going to be called ________________ This  COLOMBIAN ORCHID  is going to be called ________________ This  ECUADORIAN FOREST MOUSE  is going to be called ________________ This  COLOMBIAN FROG  with unusual leopard-like coloration  is going to be called ________________ This  ORCHID  from  Colombian cloud forest  is going to be called ________________ This  PANAMANIAN SALAMANDER with tiny legs and big eyes  is going to be called ____________...