I am a newbie to rpy2, so it might be a silly question.
I am using python 2.7 and rpy2 corresponding newest version in Linux
I tried to call R function from python using rpy2, my first a few lines are
as follows.
import rpy2.robjects as robjectsfrom rpy2.robjects.packages import importr
import rpy2.robjects.numpy2ri
rpy2.robjects.numpy2ri.activate()
r=robjects.r
astsa=importr('astsa')
astsa.acf2(L, 3) # L:a numeric list returned by my omitted
code,I checked it is a valid list
the error is as follows:
Traceback (most recent call last):
File "/home/jin/Desktop/main.py", line 63, in <module>
astsa.acf2(traffic[0], 3)
File "/usr/lib/python2.7/dist-packages/rpy2/robjects/functions.py",
line 86, in __call__
return super(SignatureTranslatedFunction, self).__call__(*args, **kwargs)
File "/usr/lib/python2.7/dist-packages/rpy2/robjects/functions.py",
line 35, in __call__
res = super(Function, self).__call__(*new_args,
**new_kwargs)RRuntimeError: Error in stats::acf(series, max.lag, plot
= FALSE) : 'x' must be numeric
If the provided code is not enough for debugging. You are welcome to
contact me and I will send you the complete code( < 30 lines). Thanks for
help, have a nice day.
--
do more, know more and be more
------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:
Build for Windows Store.
http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
rpy-list mailing list
rpy-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rpy-list