Install latest GNU R version 3.3.2 on Linux

1) Add CRAN repository

a) Ubuntu 16

sudo add-apt-repository "deb http://cran.rstudio.com/bin/linux/ubuntu trusty/"

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9


b) Debian

sudo add-apt-repository "deb http://cran.rstudio.com/bin/linux/debian jessie-cran3/"

gpg --keyserver pgp.mit.edu --recv-key 381BA480

gpg -a --export 381BA480 | apt-key add -


2) Install R

sudo apt-get update

sudo apt-get install r-base

sudo apt-get install libxml2-dev

sudo apt-get install libcurl4-openssl-dev # required for DESeq2 (annotate -> RCurl)

3) Install R packages DESeq2 & CSS

DESeq2 is required in differential_abundance.py

CSS is required in normalize_table.py

Start R and install packages:

sudo R

> source("http://bioconductor.org/biocLite.R")

> biocLite("DESeq2")

Update all/some/none? [a/s/n]: a # yes, update all old R-packages

> biocLite("optparse")

> biocLite("biom") # for CSS norm, see also: -> how to install biom

> biocLite("metagenomeSeq") # required for CSS normalization

> biocLite("biomformat")

> biocLite("randomForest") # required for supervised_learning.py

> q() # exit R

Save workspace image? [y/n/c]: n