Simone Gabbriellini wrote:
> yes, like that...
> 
> but simply importing:
> 
> Import rpy2.robjects.numpy2ri
> 
> when I do:
> 
> g1adj = numpy.array(g1adj)
> 
> robjects.r('QAPset[1,,]<-g1adj')

R has no way to know your Python variable called "gladj" unless you 
indicate it.

print(robjects.r('ls()'))
should confirm that there is no variable 'gladj' in your globalEnv.


> it says:
> 
> Error in eval(expr, envir, enclos) : object "g1adj" not found...

The error message above is correct, I think.

> while
> in the docs it says that:
> "That import alone is sufficient to switch an automatic conversion of
> numpy objects into rpy2 objects."
> 
> should I do something else?
> 
> thank you,
> simone
> 
> 2009/1/14 Laurent Gautier <lgaut...@gmail.com>:
>> Something like this
>> http://rpy.sourceforge.net/rpy2/doc/html/numpy.html?highlight=numpy
>> ?
>>
>>
>>
>> Simone Gabbriellini wrote:
>>> dear List,
>>>
>>> is it possible to pass a matrix I've built in python to R via rpy2?
>>>
>>> I'm sure I'm blind, but I cannot find example about how to pass object
>>> from python to r, while I see how to pass object from r to python...
>>>
>>> best regards,
>>> Simone Gabbriellini
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> 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
>>> rpy-list@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/rpy-list
>>
> 
> ------------------------------------------------------------------------------
> 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
> rpy-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rpy-list


------------------------------------------------------------------------------
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
rpy-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rpy-list

Reply via email to