This notebook was created using the "fake" R kernel described here, which is essentially a patched version of Fernando Perez's original implementation. Note that this approach requires installation of the Python extension rpy2. R commands can be run directly because the rpy2.ipython
extension is automatically loaded and the each code cell is automatically prepended with the Rmagic %%R
. After following the setup instructions here (toward the end of the page), to run IPython Notebook with this custom "kernel" (really a profile), start the notebook with this command:
ipython notebook --profile=rkernel
What follows is a short notebook that was created under this custom profile that can be used to test your own setup.
In [1]:
library(ggplot2)
In [2]:
head(iris)
In [3]:
ggplot(iris, aes(x = Sepal.Length, y = Petal.Length)) + geom_point() + theme_bw()