#!/usr/bin/env python # coding: utf-8 # ## jupyterでRセルが使える→未確認 # # 以下を試したがダメだった! # In[1]: get_ipython().run_line_magic('load_ext', 'rpy2.ipython') # In[8]: r('sessionInfo()') # In[9]: get_ipython().run_line_magic('R', 'X=c(1,4,5,7); sd(X); mean(X)') # In[10]: get_ipython().run_cell_magic('R', '', 'library(datasets)\npng("test.png", width=1200, height=1200, units="px", type="cairo")\nboxplot(mpg~cyl,data=mtcars, main="Car Milage Data", xlab="Number of Cylinders", ylab="Miles Per Gallon")\ndev.off()\n') # In[ ]: