We currently support two methods of interaction with R, via an R-enabled JupyterLab base image (
r-tidyverse), and more recently via a base image that additionally includes the RStudio® IDE (
rstudio-server). As with our packaging of Jupyter, we do not modify the behavior of the IDE, which means you should generally use the standard resources, such as the official support page. And whichever tool you use to develop your R code, Gigantum will monitor and record activity, including code, results, and thumbnails of images.
Due to the nature of the RStudio IDE, we are unable to restrict the tool to the permanent storage (located at
/mnt/labbook). Please note that while you can change your working directory and even write files in other directories, these changes will not be recorded in your project and will not sync to the repository or other computers.
Note also that we do not currently have a way to directly support licensed software, but please let us know if you need it! For example, using a pro license from RStudio, Inc. should be possible with some work.
Currently, there are quite a few approaches to installing packages for R. Our Jupyter-only and RStudio bases are configured with the CRAN PPA, which allows using the "Apt" package manager to install most packages as
r-cran-<packagename>. You can search the full list of available package on the PPA packages list (note that the "3.5" PPA supports R 3.6, which is what we currently distribute). Not all CRAN packages are available in this PPA!
In addition, the R bases have the
devtools package installed, which means you can use
install_github() and friends in addition to
In general, any approach to installing packages in R on Ubuntu should work on our base images. But you'll want to do so in the Gigantum Client's environment tab - NOT in your IDE. You can run any R command like so as a docker snippet:
RUN R -e 'if (!requireNamespace("BiocManager", quietly = TRUE)) install.packages("BiocManager"); BiocManager::install()' \ && R -e "stopifnot(all(c('BiocManager') %in% installed.packages()[, 'Package']))"
Note that in the above, we include an explicit step that causes the build to fail if required packages are not installed - this test for packages should work with any approach to installation. This is an important step to guarantee that your image is building correctly - otherwise, R will happily return "success" even when package installation fails. (And of course, you could also install
r-cran-biocmanager in the apt tab!)
An additional optimization if you have to build a project to get the latest and greatest is to use Apt to get the requirements for the package installed - so you only need to build the package itself.
If you're having trouble installing a package, please feel free to reach out on our forum.
RStudio® and the RStudio logo are registered trademarks of RStudio, Inc.
Updated almost 2 years ago