Until now, when trying to run R on IPython Notebook, there was a method of doing rpy2 and so on, but it was inconvenient to hit %% each time.
However, with the release of IPython 3.0 at the end of last month (February 27, 2015), the IPython Notebook has changed significantly, and cooperation with R has become much easier (although it is still a development version)! In the future, it seems that it will cover not only R but also Julia and other languages, and the part that does not depend on a specific language is done in another project called Jupyter It seems to go.
It seems that the following are the Jupyter kernels of typical languages.
See the following page for all Jupyter kernels available at this time. IPython kernels for other languages
See the following page for examples of notebooks using other language kernels.
So, IPython Notebook (Jupyter) + R, which is the subject of this time, looks like this. Basically, it is good to do as it is in Native R kernel for IPython. When I built the environment with OSX Yosemite (10.10.2) + MacPorts, I got an error on the way, but I added cppzmq
with MacPorts.
A linear regression with the iris dataset that is included in R from the beginning looks like this. This is good!
Recommended Posts