Our Sponsors



Download BioinformaticsOnline(BOL) Apps in your chrome browser.




Install R in Ubuntu / Linux !

  • Public
By Abhi 1055 days ago
#R is a feature rich interpretive programming language originally released in 1995. It is heavily used in the bioinformatics community largely due to numerous R libraries available on bioconductor. It takes a several minutes to compile so we’ll use one which has already been setup. If we were to install R, we first would need to download and extract the source code. Next we’d configure the installation with --with-x=no which tells R to install without X11, a windowing system for displays. We’d also specify --prefix which is where the R framework will go, this includes the additional R libraries we’ll download later. From there we’d do make and make install to build the software and copy the files to their proper location and create symlinks for the executables. Finally we’d install the devtools and Biocmanager packages from the command line to make installing additional packages easier. We’ve commented out the code below, however it is exactly what was run to set up the R we will be using, except the installation location. ## download and extract cd ~/workspace/bin wget https://cran.r-project.org/src/base/R-3/R-3.5.1.tar.gz tar -zxvf R-3.5.1.tar.gz ## configure the installation, build the code cd R-3.5.1 ./configure --prefix=/home/ubuntu/workspace/bin --with-x=no make make install ## make symlinks ln -s ~/workspace/bin/R-3.5.1/bin/Rscript ~/workspace/bin/Rscript ln -s ~/workspace/bin/R-3.5.1/bin/R ~/workspace/bin/R ## test installation cd ~/workspace/bin ~/workspace/bin/Rscript --version ## install additional packages ~/workspace/bin/R --vanilla -e 'install.packages(c("devtools", "BiocManager", "dplyr", "tidyr", "ggplot2"), repos="http://cran.us.r-project.org")'