我的Python脚本开始与 from __future__ import division
在RI做 library(rPython)
python.load("myscript.py")
我得到 File "", line 2 SyntaxError: from future imports must occur at the beginning of the file
我尝试使用rPython包传递一些参数到python代码并返回结果。但由于某种原因,我得到奇怪的编码从我的Python代码。也许有人有一些提示指出我。 这里是我的简单的代码来测试: require(rPython)
#pass the test word 'audiention' (in ukrainian)
word<-"аудієнція"
python.assign("input",
rpytester.r一个.py文件,并包含以下行 library(rPython)
python.load("model.py")
python.call("printme", "asdf")
model.py包含以下行: def printme(str):
"This prints a passed string into this function"
return
我试图用install.packages("rPython")在windows下安装rPython。但是,我收到一个包不存在的错误。 Warning in install.packages :
package ‘rPython’ is not available (for R version 3.2.5)
在包我只能找到这个安装文档: WINDOWS SYSTEMS
=======