rpy2,包 'outliers' 函数不工作
rpy2, package 'outliers' functions not working
我对 R 包中的几乎所有函数都有问题:离群值。
正常工作的 "choosen one" 函数是 outliers
list_ = ['chisq.out.test','cochran.test', 'dixon.test',
'grubbs.test', 'outlier', 'qcochran']
y = some data without brackets like 0.0, 0.0, 0.0, 0.48416666667,
for f in list_:
try:
code = """ y=c({0});
require(outliers);
{1}(y);""".format(y, f)
我收到消息:
could not find function "complete.cases"
我也试过:
y = FloatVector([0.0, 0.0, 0.0, 0.48416666667, 0.48716666667])
outliers = importr('outliers')
outliers.outlier(y) //works
outliers.cochran.test(y) //not working -> syntax is different
你有什么建议,我该如何解决?
提前致谢
在R中,"dot"可以用在变量名中。它不能在 Python.
importr
正在尝试帮助解决此问题,如下所述:
http://rpy2.readthedocs.io/en/version_2.8.x/robjects_rpackages.html
我对 R 包中的几乎所有函数都有问题:离群值。 正常工作的 "choosen one" 函数是 outliers
list_ = ['chisq.out.test','cochran.test', 'dixon.test',
'grubbs.test', 'outlier', 'qcochran']
y = some data without brackets like 0.0, 0.0, 0.0, 0.48416666667,
for f in list_:
try:
code = """ y=c({0});
require(outliers);
{1}(y);""".format(y, f)
我收到消息:
could not find function "complete.cases"
我也试过:
y = FloatVector([0.0, 0.0, 0.0, 0.48416666667, 0.48716666667])
outliers = importr('outliers')
outliers.outlier(y) //works
outliers.cochran.test(y) //not working -> syntax is different
你有什么建议,我该如何解决? 提前致谢
在R中,"dot"可以用在变量名中。它不能在 Python.
importr
正在尝试帮助解决此问题,如下所述:
http://rpy2.readthedocs.io/en/version_2.8.x/robjects_rpackages.html