Skip to content

Advanced Research ComputingInstalling the R kernel


Installing the R kernel for Jupyter Notebook and JupyterLab

In order to use the R kernel for Jupyter Notebook (or Lab), you will first need to log into the appropriate cluster (e.g. Great Lakes, Armis2, Lighthouse), load the R and anaconda modules with the same versions you intend to use within the Jupyter app, launch R, and install the IRkernal package as follows:

$ module load python3.8-anaconda/2021.05
$ module load R/4.2.0
$ R

> install.packages('IRkernel', repo='https://repo.miserver.it.umich.edu/cran/')

If it is your first time installing an R package on the cluster (or the first time for a particular version of R), you will need to respond "yes" to use a personal library, and "yes" again to create a personal library to install packages into.

Next, install the kernel spec, as follows:

> IRkernel::installspec()

Now you can quit R and log into Open OnDemand, see Using Open OnDemand, to run Jupyter with the R kernel. Note, in case it is not obvious, you must add the same R module when you run the Jupyter application as when you installed the R kernel; here is an example,

Jupyter Module command example

If have questions about using other kernels with JupyterLab or Jupyter Notebook, please contact ARC support at arc-support@umich.edu or use this form to create a service request ticket for help.