R: Configure Jupyter to work with R on a Mac

How to configure Jupyter Notebook to work with R on a Mac using Homebrew.

R: Configure Jupyter to work with R on a Mac

The vanilla installation of Jupyter comes with Python pre-installed, but I want to work with R. Here's how.

Step 0 - Install Jupyter

Install Jupyter notebook on a Mac using Homebrew.

Step 1 - Configuring Jupyter for R

Open up Utilities > Terminal and install a few more R-related packages using Homebrew.

brew install libgit2

Open up R within Terminal.


Install these R libraries. Take note how you can download multiple libraries at once.

), dependencies = TRUE)

Time to install the R package. devtools::install_github allows you to install packages from Github.



Step 2 - Make R visible to Jupyter

Install the Interactive R kernel system-wide.

IRkernel::installspec(user = FALSE)

Step 3 - Create a new File



You should now be able to see R within Jupyter.