我有 python 3 环境
安装了 rpy2
conda install -c r rpy2=2.8.5
在 jupyter notebook 中加载 cell magic
%load_ext rmagic
当我尝试在笔记本中使用 R 块时,它给了我错误
ERROR:root:Cell magic `%%R` not found.
最佳答案
在终端中:
pip install rpy2
在笔记本中:
%load_ext rpy2.ipython
那么你可以使用
%%R
:%%R
var <- c(1, 2, 3)
关于r - 错误 :root:Cell magic `%%R` not found,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43682789/