Thursday, March 31, 2022

Using R in Jupyter Notebook

Here is a short tutorial about running R in Jupyter Notebook on a Windows system.

1. Install R by downloading R binary installer from the Comprehensive R Archive Network [CRAN] https://cran.r-project.org/.

2. Install Python 3.x from Python official website at https://www.python.org/. Add Python 3.x to system PATH after installation.

3. Install PIP and Jupyter Notebook:

python -m pip install --upgrade
pip install jupyter
4. Install R kernel for Jupyter Notebook in R terminal:
install.packages('IRkernel')
5. Add kernel to Jupyter by running the following in R terminal:
IRkernel::installspec(user = FALSE)
6. Run jupyter notebook from the Windows Command Prompt to start the Jupyter Notebook. Now you should be able to create a new Notebook for R.