Skip to content

Instantly share code, notes, and snippets.

@marcelotournier
Created January 31, 2020 03:36
Show Gist options
  • Save marcelotournier/c555ac33d77483dce5782450bc6e0189 to your computer and use it in GitHub Desktop.
Save marcelotournier/c555ac33d77483dce5782450bc6e0189 to your computer and use it in GitHub Desktop.
R script to install the R jupyter notebook kernel
# R script to install the R jupyter notebook kernel
# Instructions:
# 1. Install Anaconda 3
# 2. Install the R Binaries from CRAN. No need for RStudio to run Jupyter notebooks.
# 3. If you are on a Mac, install XQUARTZ from https://www.xquartz.org/
# 4. In terminal, go to this script directory, and open R there (R, not RStudio)
# run in the R REPL Shell:
"source("jupyte.R")"
install.packages(c('devtools','repr', 'IRdisplay', 'evaluate', 'crayon', 'pbdZMQ', 'devtools', 'uuid', 'digest'))
devtools::install_github('IRkernel/IRkernel')
IRkernel::installspec() # install for the current user
# 5. You can close R and run jupyter notebook in terminal
# 6. When choosing a new notebook, the option for R notebooks will be available.
# Credits to https://richpauloo.github.io/2018-05-16-Installing-the-R-kernel-in-Jupyter-Lab/ , for the tutorial.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment