Python 在rpy中传递R函数参数

Python 在rpy中传递R函数参数,python,r,rpy2,Python,R,Rpy2,我有以下两行代码,它们在R和Python中都运行良好(通过Rpy): 但是,如果我想添加include.lowest=TRUE的参数,它将在R: [R] rcut = cut(vector, brks, include.lowest=TRUE) 但它在Rpy中不起作用: [Python] rcut = r.cut(vector, brks, include_lowest="TRUE") 这会产生以下错误: rpy.RPy_RException: Error in ok &&

我有以下两行代码,它们在R和Python中都运行良好(通过Rpy):

但是,如果我想添加
include.lowest=TRUE
的参数,它将在R:

[R] rcut = cut(vector, brks, include.lowest=TRUE)
但它在Rpy中不起作用:

[Python] rcut = r.cut(vector, brks, include_lowest="TRUE")
这会产生以下错误:

rpy.RPy_RException: Error in ok && include.lowest : invalid 'y' type in 'x && y'

你知道是什么原因造成的吗?我该怎么做才能让它起作用?谢谢

我不知道
rpy
,但可能是因为使用了
“TRUE”
(一个字符)而不是
TRUE
(一个逻辑字符)

编辑:
rpy
文档似乎表明使用了
r.TRUE


我不知道
rpy
,但这可能是因为使用了
“TRUE”
(一个字符)而不是
TRUE
(一个逻辑字符)

编辑:
rpy
文档似乎表明使用了
r.TRUE


我对Rpy一无所知,但我想它应该是
include_loost=True
(没有引号,
True
在python中是一个布尔值。)

我对Rpy一无所知,但我想它应该是
include_loost=True
(没有引号,
True
在python中是一个布尔值。)

rpy.RPy_RException: Error in ok && include.lowest : invalid 'y' type in 'x && y'