18.1 Prepare your R environment

All statistical analyses included in the Holo-omics workbook are conducted in R environment [56]. R is a free software environment for statistical computing and graphics. It compiles and runs on a wide variety of UNIX platforms, Windows and MacOS, and in order to use it, R or RStudio must be installed in your local computer or remote server.

Required packages

In order to reproduce the analyses shown in the workbook, a rather long list of R packages must be installed. Packages are the fundamental units of reproducible R code, which include reusable R functions, the documentation that describes how to use them, and sample data.

  • ape
  • DESeq2
  • distillR
  • ggplot2
  • tidyverse
  • vegan
  • (…)

Package installation

Packages are installed programatically using three main ways: through CRAN, Bioconductor or Github.

Install package from CRAN

CRAN is a network of ftp and web servers around the world that store identical, up-to-date, versions of code and documentation for R. Packages stored in CRAN can be installed using the following code:

install.packages("package_name")
#e.g.
install.packages("vegan")

Install package from Bioconductor

Bioconductor is a free, open source and open development software project for the analysis and comprehension of genomic data generated by wet lab experiments in molecular biology. Packages included in Bioconductor can be installed using the following code:

if (!require("BiocManager", quietly = TRUE))
    install.packages("BiocManager")
BiocManager::install("package_name")
#e.g.
BiocManager::install("DESeq2")

Install package from Github

GitHub is a code hosting platform for version control and collaboration. Packages stored in R can be installed using the following code after installing the package devtools:

library(devtools)
install_github("github_repository_name_of_the_package")
#e.g.
install_github("anttonalberdi/distillR")

References

56. R Development Core Team. R: A language and environment for statistical computing. Vienna, Austria; 2008.