Dear List,
sorry, but it's me again, because I still cannot figure out how to do
this thing...
I have my matrix in R as a numpy.array, everything is ok:
In [35]: mymatrixR
Out[35]: <RArray - Python:0x19c175a8 / R:0x1af39800>
now I want to put mymatrixR inside the R object QAP, something like
QAPset[,,1]<-mymatrixR
if I simply do:
robjects.r('QAP<-array(dim=c(50,50,2))')
robjects.r('QAP[,,1]<-mymatrixR')
Errore in eval(expr, envir, enclos) : oggetto "mymatrixR" non trovato
---------------------------------------------------------------------------
RRuntimeError Traceback (most recent call last)
/Users/ogabbrie/Desktop/NetworkSimulatorTraits/<ipython console> in <module>()
/Library/Frameworks/Python.framework/Versions/4.1.30101/lib/python2.5/site-packages/rpy2/robjects/__init__.pyc
in __call__(self, string)
532 def __call__(self, string):
533 p = self.parse(text=string)
--> 534 res = self.eval(p)
535 return res
536
/Library/Frameworks/Python.framework/Versions/4.1.30101/lib/python2.5/site-packages/rpy2/robjects/__init__.pyc
in __call__(self, *args, **kwargs)
420 for k, v in kwargs.iteritems():
421 new_kwargs[k] = conversion.py2ri(v)
--> 422 res = super(RFunction, self).__call__(*new_args, **new_kwargs)
423 res = conversion.ri2py(res)
424 return res
RRuntimeError: Errore in eval(expr, envir, enclos) : oggetto
"mymatrixR" non trovato
how should I refer to mymatrixR?
thanks,
simone
------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
rpy-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rpy-list