Install Jupyter notebook with R

I assume that you have already installed R. 


I. For Windows

0. If you need to install R, go to https://cloud.r-project.org/, follow the instruction to download the version for windows and run the installation. 

1. install anaconda following the instructions in the linked article


2. Then use the instruction below to install IRkernel which links R with Jupyter notebook:

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

install.packages("IRkernel")

library(IRkernel)

installspec()

3. Open an anaconda prompt and type in 
jupyter lab

II. For MacOS

0. If you need to install R, go to https://cloud.r-project.org/, follow the instruction to download the version for windows and run the installation. Or if you don't care about having a graphic interface, you can wait until the end of next step. 

1. Install homebrew
Click on the link and  follow the instructions

2. Install jupyter lab , open a terminal and run 

brew install jupyterlab 

If you have not installed R, you can do it now by running

brew install r

3. Then open a R session and install IRkernel as above. 

4. To start jupyter lab, open a terminal and run

jupyter lab


Note:

1. For windows, 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 only one R installation on your computer. Multiple R installations
could lead to some conflict.


Comments

Popular posts from this blog

Syllabus