/
How to install an R package from CRAN within the TRE

How to install an R package from CRAN within the TRE

Introduction

Our TRE allows access to all packages within CRAN (Comprehensive R Archive Network). CRAN is a network of servers that store R code used for data science analytics. We do this by running a faux-CRAN mirror which, instead of hosting CRAN packages, simply downloads on-demand the package requested and scans it for malware prior to returning it to your TRE workspace. This is far faster than our previous method where manual approval was required for each package within our mirror.

Installation

Assuming the package you want exists in CRAN, you can install it via our Cloud TRE CRAN proxy in the usual way, using the RStudio GUI. Alternatively, you can use the install.packages(...) command. E.g., to install tidyverse,

>>> install.packages('tidyverse')

We support access to binary packages for the versions of R we run, as well as source packages for our Ubuntu workspaces. Installation from Ubuntu workspaces can therefore take a while as each CRAN package has to be compiled if it includes native code.

RTools is installed on all workspaces, which allows for installation from source or installation of packages which include native code.

Bioconductor

In addition to packages from CRAN, we also provide access to packages from Bioconductor. This does not include the experiment or data trees, which may be ingressed separated given governance approval. The changes for bioconductor access haven’t made it into the default workspace configuration yet, but can still be used after contacting HICSupport for a copy of the appropriate bioconductor.yaml.

install.packages("BiocManager") options(BIOCONDUCTOR_CONFIG_FILE="file://C:/bioconductor.yaml") options(BioC_mirror="http://bioconductor.hic-tre.dundee.ac.uk") options(BIOCMANAGER_SITE_REPOSITORY="http://bioconductor.hic-tre.dundee.ac.uk") library(BiocManager) BiocManager::install("biocondcutor package name")

Β 


For queries or comments regarding HIC How To Articles contact, HICSupport@dundee.ac.uk

Β 

Β Related articles

Related content

What software is available in the TRE?
What software is available in the TRE?
More like this
Why is it asking me for an authentication code when I login?
Why is it asking me for an authentication code when I login?
Read with this
How to install Conda Forge packages
How to install Conda Forge packages
Read with this
Can I use Microsoft Office in the TRE?
Can I use Microsoft Office in the TRE?
Read with this
An Introduction to Statistical Disclosure Control
An Introduction to Statistical Disclosure Control
Read with this
How to create and use a Slurm cluster within the TRE
How to create and use a Slurm cluster within the TRE
Read with this