Skip to content

[MC2DP-908] Add R packages and R_LIBS_USER for user-installable libs in jupyter-rcc#320

Open
wangfan860 wants to merge 5 commits into
masterfrom
feat/rcc-r-packages
Open

[MC2DP-908] Add R packages and R_LIBS_USER for user-installable libs in jupyter-rcc#320
wangfan860 wants to merge 5 commits into
masterfrom
feat/rcc-r-packages

Conversation

@wangfan860

Copy link
Copy Markdown
Contributor

Link to JIRA ticket if there is one: https://ctds-planx.atlassian.net/browse/MC2DP-908

New Features

  1. Preinstalled R packages

The following are now available out of the box:

devtools, broom, comorbidity, survival, data.table, dplyr, fst,
lubridate, magrittr, MASS, pbapply, reshape2, stringi, stringr,
sqldf, tableone, xlsx, testthat (3.2.3, requirement was >= 2.1.0)
  1. Users can now install their own R packages

Previously install.packages('foo') failed in the R kernel with
lib = "/usr/local/lib/R/site-library" is not writable, because that directory
is root-owned and the workspace runs as jovyan. Outside of IRkernel, R would
normally offer to create a personal library, but that prompt cannot work in a
notebook, so it just errored out.

This PR sets R_LIBS_USER=/home/jovyan/pd/r_libraries in the image, and creates
that directory in start-notebook.sh. Users can now do:

install.packages('maftools')
# Kernel -> Restart Kernel
library(maftools)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants