Reputation: 52777
I have jupyter notebook installed, I also have R installed. Both work fine independently.
When I run jupyter with jupyter notebook
, then try to open an ipynb
file, I see
The only option in the dropdown is Python 3 (R is not an option).
How do you open a jupyter notebook with an R kernel (on mac)?
jupyter notebook --runtime-dir /usr/local/bin/R
but that was just guessingpip
?Upvotes: 9
Views: 31258
Reputation: 52777
Open any R session (e.g. in RStudio is fine, or open terminal/bash and type R
to start an R session).
Install the kernel with:
install.packages("devtools")
devtools::install_github("IRkernel/IRkernel")
IRkernel::installspec()
Close and reopen the notebook and the R kernel will now be available.
Upvotes: 17
Reputation: 4811
If the R kernel does not appear as an option within a Jupyter notebook even after installing R, and one is using Anaconda, bringing up the conda prompt from the Start menu (Windows 10), and running the following commands may do the trick:
conda config --add channels r
conda install --yes r-irkernel
Credit to this post.
Upvotes: 2