python - jupyter R 魔术到 python 脚本

标签 python r pandas jupyter

我如何将像 %%R%Rpush%Rpull 这样的 jupyter R 魔法或 R 函数的执行转换成一个普通的 python 脚本?

最佳答案

答案部分在上面的评论中: http://rpy2.readthedocs.io/en/version_2.8.x/introduction.html#creating-rpy2-vectors这是一个很好且更长的解释 这是最后提到的实现 %Rpush robjects.IntVector([1, 2, 3])

问题的解决方案

关于python - jupyter R 魔术到 python 脚本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40223498/

相关文章:

从 ggraph 图中的动态布局中删除孤立节点

R文本挖掘包: Allowing to incorporate new documents into an existing corpus

python - pandas 将 asof 与多个匹配项合并

python - Pandas Dataframe.apply() 因提供太多参数而引发类型错误

python - AttributeError: 'Series' 对象没有属性 'isoweekday'

python - 如何省略 Sphinx 上的变量值?

python - 3D 矩阵元素与 2D 矩阵副本的高效逐元素乘法?

r - 使用 Safely from Purrr 时调试函数?

python - 使用字典键转换列表中的元素

StreamHandler 上的 Python setLevel 不起作用