为什么纯R脚本的输入不同于R和Python脚本的组合?

为什么纯R脚本的输入不同于R和Python脚本的组合?,python,r,rpy2,statistics,Python,R,Rpy2,Statistics,我在R中有这个脚本: from rpy import * r.library("robustbase") adjboxStats(c(11232.1, 234.2, 3445532344.3, 34302.3, 203.9, 232223.3, 3434.55), coef = 2.5, a = -4, b = 3, do.conf = TRUE, do.out = TRUE) 它给了我这个输出: $stats [1] 203.900 1834.375 11232.100 13

我在R中有这个脚本:

from rpy import * 
r.library("robustbase") 
adjboxStats(c(11232.1, 234.2, 3445532344.3, 34302.3, 203.9, 232223.3, 3434.55), coef = 2.5, a = -4, b = 3, do.conf = TRUE, do.out = TRUE)
它给了我这个输出:

$stats
[1]    203.900   1834.375  11232.100 133262.800 232223.300

$n
[1] 7

$conf
[1] -67254.84  89719.04

$fence
[1]   -6963.467 5097118.725

$out
[1] 3445532344

相同的脚本,但它是R和python的混合体:

#!/usr/bin/python
from rpy import * 
r.library("robustbase") 

r("adjboxStats")(r.c(11232.1, 234.2, 3445532344.3, 34302.3, 203.9, 232223.3, 3434.55), coef = 2.5, a = -4, b = 3, do_conf = True, do_out = True)
给我这个输出,它缺少围栏属性(异常值)


当我尝试像这样添加围栏属性时:

print r("adjboxStats")(r.c(11232.1, 234.2, 3445532344.3, 34302.3, 203.9, 232223.3, 3434.55), coef = 2.5, a = -4, b = 3, do_conf = True, do_out = True, do_fence = True)
我收到以下错误消息:

rpy.RPy_RException: Error in function (x, coef = 1.5, a = -4, b = 3, do.conf = TRUE, do.out = TRUE)  :
  unused argument(s) (do.fence = TRUE)
有人知道为什么会这样吗

谢谢

rpy.RPy_RException: Error in function (x, coef = 1.5, a = -4, b = 3, do.conf = TRUE, do.out = TRUE)  :
  unused argument(s) (do.fence = TRUE)