gpt4 book ai didi

python - jupyter R 魔术到 python 脚本

转载 作者:行者123 更新时间:2023-11-28 19:11:00 25 4
gpt4 key购买 nike

我如何将像 %%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/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com