R: Configure Jupyter to work with R on a Mac
How to configure Jupyter Notebook to work with R on a Mac using Homebrew.
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
Terminal and install a few more R-related packages using Homebrew.
brew install libgit2
Open up R within Terminal.
R libraries. Take note how you can download multiple libraries at once.
install.packages(c( 'repr', 'IRdisplay', 'evaluate', 'crayon', 'pbdZMQ', 'devtools', 'uuid', 'digest', 'git2r' ), 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.
- How to fix XLConnect using R This article is handy if you plan to import an Excel file into R.