Install Jupyter notebook with R

 For Windows, install anaconda following the instructions in the linked article

There use the following the instruction below to install IRkernel which links R with Jupyter notebook:

Start a R session, (you may need to open within the Anaconda Prompt, but it worked for me with a regular R session) 

install.packages("IRkernel")

library(IRkernel)

installspec()


For MacOS, install anaconda following the above linked article. 
Open a terminal and run
conda install -c anaconda jupyter_client

Then open a R session and install IRkernel as above. To run jupyter lab, open an terminal and first 
conda activate base

To start jupyter notebook, open a terminal and run

jupyter lab

Note:

1. In some cases, you may need to install jupyter lab manually.
In terminal, under the conda environment, run

pip install jupyterlab

2. Make sure that there is no R installed in the conda environment, which could lead to some conflict.




Comments

Popular posts from this blog

Syllabus

A Short Guide on Running Jupyter Notebook on CoCalc