Runing R code on `python` with SyntaxError: keyword can't be an expression error Message -
i'm looking run r
code on python
i installed r package robustbase
on ubunto using apt-get install r-cran-robustbase
, rpy packege well.
from python console can run from rpy import *
, r.library("robustbase")
when run
result = robjects.floatvector([11232.1, 234.2, 3445532344.3, 34302.3, 203.9, 232223.3, 3434.55]) print(result.r_repr()) r(adjboxstats(c(11232.1, 234.2, 3445532344.3, 34302.3, 203.9, 232223.3, 3434.55), coef = 2.5, = -4, b = 3, do_conf = true, do_out = true))
to outliers values
but error :
adjboxstats(c(11232.1, 234.2, 3445532344.3, 34302.3, 203.9, 232223.3, 3434.55), coef = 2.5, = -4, b = 3, do.conf = true, do.out = true) syntaxerror: keyword can't expression
when run on r console works!!!
library("robustbase") adjboxstats(c(11232.1, 234.2, 3445532344.3, 34302.3, 203.9, 232223.3, 3434.55), coef = 2.5, = -4, b = 3, do.conf = true, do.out = true)
i search here , here , here no luck. doesn knows error message , there's way go arround it?
thanks!
you can't use do.conf
or do.out
arguments python function (even if function converted r).
instead, call them do_conf
, do_out
. getting tripped error, how refer r("adjboxstats")
:
r("adjboxstats")(result, coef = 2.5, = -4, b = 3, do_conf = true, do_out = true)
this fix syntax issues.
Comments
Post a Comment