Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installing R kernel for Ipython on Windows

Tags:

r

ipython

jupyter

I am on Windows 10. I have installed R-3.2.0, Anaconda 2.2.0 64 bit, RStudio-0.99.446. Also, edited system path variable to include R installation directory.

I am following all the instruction given in https://github.com/IRkernel/IRkernel but I am not getting R kernel when I open Ipython notebook.

Can anybody tell what am I missing?

like image 747
Swastik Avatar asked Jun 10 '26 23:06

Swastik


2 Answers

Got it working, after following all the process mentioned in IRkernel GitHub page. Create kernel.json file in C:\Users\[username]\.ipython\kernels\R_kernel, content of the file should be

{"argv": ["C:/Program Files/R/R-3.2.0/bin/R.exe","-e","IRkernel::main()",
"--args","{connection_file}"],
"display_name":"R"
}

Note that instead of forward slash path should contain backward slash as mentioned above.

like image 52
Swastik Avatar answered Jun 12 '26 13:06

Swastik


Once IRkernel is installed, you can also simply issue the following command in R:

IRkernel::installspec(user = FALSE)

The kernel.json file should be automatically created in the appropriate folder ("C:\ProgramData\jupyter\kernels\ir"), along with a nice R logo

like image 33
lgalarno Avatar answered Jun 12 '26 13:06

lgalarno



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!