Environment setup

Along this section, we will go over the R packages (and versions) required to navigate through the workshop. We recommend to use RStudio as the integrated development environment (IDE) to use R, although any other IDE can be used. We suggest to use R version > 4.1.

R packages

The required R packages are the following:

  • opalr 3.1.0: To login to an Opal server using R and retrieve information of the server (projects, resources, tables, etc).
  • DSI 1.4.0: The DataSHIELD Interface (DSI) handles the connections to the databases.
  • DSOpal 1.3.0: DSOpal is an extension of DSI to connect to to Opal servers.
  • dsBaseClient 6.1.1: Implementation of the base R functions (Example: Base package function as.factor is implemented as ds.asFactor).
  • dsHelper 0.4.12: dsHelper is a compedium of wrappers for dsBaseClient functions that simplify some common operations to maintain sanity.
  • dsSurvivalClient 1.0.0: Client package to perform survival analysis. It requires dsSurvival on the study servers.
  • dsMTLClient 0.9: Client package to perform federated multi-task learning. It requires dsMTLBase on the study server.
  • dsDatesClient 0.0.0.9000: Client package to work with dates. It requires dsDates on the study server.

Install guide

The proposed install guide has been tested on a clean installation with R 4.2.0 and RStudio 2022.02.2 Build 485; if any errors occur, please consider using a clean install or refer to the official R documentation regarding the errors you are getting. If you are facing permissions issues, contact your system administrator.

To install the required packages we will need the devtools package.

install.packages("devtools")

Afterwards, we can install the packages, make sure to have RTools installed:

devtools::install_version("opalr", version = "3.1.0", repos = 'https://cran.r-project.org/')
devtools::install_version("DSI", version = "1.4.0", repos = 'https://cran.r-project.org/')
devtools::install_version("DSOpal", version = "1.3.0", repos = 'https://cran.r-project.org/')
devtools::install_github("datashield/dsBaseClient", "6.1.1")
devtools::install_github("lifecycle-project/ds-helper", "0.4.12")
devtools::install_github("neelsoumya/dsSurvivalClient")
devtools::install_github("transbioZI/dsMTLClient")
devtools::install_github("isglobal-brge/dsDatesClient")