Installing R packages
Last updated
Was this helpful?
Last updated
Was this helpful?
Installing an R package in Linux could take a long time because it needs to be downloaded, compiled, and then installed. Thus, users suffer from long build times when rebuilding the Environment. R Caching stores the binary (compiled) versions of the package so that the system reuses and skips the downloading and compiling steps if the same package has been installed in the deployment before.
R Caching is enabled by default, and is available in the Admin Panel for the admin to enable/disable the R Caching and/or add a private CRAN repository (the company's repo). This repo should behave as an open CRAN mirror and return the index and packages as expected by any self-hosted mirror.
Once the R Caching is enabled, the related command will be added to the Dockerfile upon the package being added to R(CRAN) or Bioconductor for the Capsule created after the R Caching configuration. For the old Capsule, the Dockerfile will be only updated when it's modified.
It is possible for the environment build to be successful but the package is not found during runtime. This mainly occurs when an R package doesn't return a non-zero error. This results in the environment building, but some packages are not installed. In this case, the package's version will still be "latest" since it never gets installed. For example, if you choose an R base image and add 'nloptr' to R(CRAN), the environment will run, but the 'nloptr' package is not installed and no version gets pinned.