【发布时间】:2012-10-08 07:08:03
【问题描述】:
我正在使用 rpy2 从 python 调用 R 函数。
from rpy2.robjects import *
result=r.someFunctioninR() #someFunctioninR is a R function written by myself
if result==r('as.null()'):
do something
else:
do something else
someFunctioninR() 返回的“结果”可以是 NULL 或其他格式。 result==r('as.null()') 不起作用。当结果为 NULL 时,我还有其他方法可以获得 True 吗?
【问题讨论】: