在jupyter中调用R代码
在当前cell运行R代码
先在一个cell中加载对应的rpy2
使用margic 命令声明当前cell为R代码
#加载包
%load_ext rpy2.ipython
##运行R
%%R
library(ggplot2)
ggplot(iris, aes(x=Sepal.Length,
y=Sepal.Width,
color=Species))+
geom_point()
Last updated
Was this helpful?