Installation instructions

For this course, you are expected to use (a programming language and environment for statistical computing and graphics) and RStudio (an Integrated Development Environment (IDE) for R).

Installing R and RStudio

1. The first step is to install R software. We recommend using the pre-compiled versions providedĀ here.

  • If you use Windows, we recommend you also get Rtools which you can get here. You need this to more easily install packages.

2. Next, you need to install RStudio, which provides a nice graphical interface for R. You can install the latestĀ RStudio release here.

3. Install all the R libraries necessary for this course using RStudio. For this, open your RStudio and copy-paste the following code without any changes to your RStudio console and execute it. This operation will take a few minutes.

# install a package manager
install.packages("pak", repos = sprintf("https://r-lib.github.io/p/pak/stable/%s/%s/%s", .Platform$pkgType, R.Version()$os, R.Version()$arch))
# install the packages
pak::pkg_install(c("Rcpp","openxlsx","gplots","ggplot2","RColorBrewer","glmnet","factoextra","FactoMineR","caret","survival","survminer","Biobase","GEOquery","limma","piano","mogene10sttranscriptcluster.db","gprofiler2", "clusterProfiler","sva","genefilter","TCGAbiolinks","msigdbr","edgeR","SummarizedExperiment","hugene10sttranscriptcluster.db","BiocManager"))

4. Finally, test if everything was installed properly simply by rerunning the previous line (also below for clarity). If everything was installed properly, it should tell you “No downloads are needed”.

# check if all packages have been installed
pak::pkg_install(c("Rcpp","openxlsx","gplots","ggplot2","RColorBrewer","glmnet","factoextra","FactoMineR","caret","survival","survminer","Biobase","GEOquery","limma","piano","mogene10sttranscriptcluster.db","gprofiler2", "clusterProfiler","sva","genefilter","TCGAbiolinks","msigdbr","edgeR","SummarizedExperiment","hugene10sttranscriptcluster.db","BiocManager"))

NB: If you use Linux, you might have to install some system packages before you can successfully install the R packages listed below. For example, you can run the following command in Ubuntu to install most, if not all, of the required system dependencies:

sudo apt install build-essential libcurl4-gnutls-dev libxml2-dev libssl-dev

Troubleshooting

If you have installed R previously, and don’t have the latest version (R 4.4.2) you might need to re-install all previously installed packages.

Contact the course team if you have any trouble with these instructions.