Re: [Rpy] build an R DataFrame from a python dictionary in Rpy2

2009-08-13 Thread laurent
The documenation for the development branch has: http://rpy.sourceforge.net/rpy2/doc-dev/html/robjects.html#data-frames L. On Wed, 2009-08-12 at 23:17 -0700, Jacob Biesinger wrote: > Hi! > > Was just reading > http://www.mail-archive.com/rpy-list@lists.sourceforge.net/msg01342.html and > was

Re: [Rpy] build an R DataFrame from a python dictionary in Rpy2

2009-08-12 Thread Jacob Biesinger
Hi! Was just reading http://www.mail-archive.com/rpy-list@lists.sourceforge.net/msg01342.html and was wondering if there is any additional documentation on this subject. Thanks! -- Jake Biesinger -- Let Crystal Reports h

Re: [Rpy] build an R DataFrame from a python dictionary in Rpy2

2008-10-17 Thread laurent
On Fri, 2008-10-17 at 09:53 +0100, Peter wrote: > Laurent Gautier wrote: > > > > As you noticed, there was something missing in the example I just gave. > > It should have been: > > > > import array > > import rpy2.robjects as ro > > > > d = dict(x = array.array('i', [1,2]), y = array.array('i',

Re: [Rpy] build an R DataFrame from a python dictionary in Rpy2

2008-10-17 Thread Peter
Laurent Gautier wrote: > > As you noticed, there was something missing in the example I just gave. > It should have been: > > import array > import rpy2.robjects as ro > > d = dict(x = array.array('i', [1,2]), y = array.array('i', [2,3])) > dataf = ro.r['data.frame'](**d) Hi Laurent, You mentione

Re: [Rpy] build an R DataFrame from a python dictionary in Rpy2

2008-10-17 Thread laurent
As you noticed, there was something missing in the example I just gave. It should have been: import array import rpy2.robjects as ro d = dict(x = array.array('i', [1,2]), y = array.array('i', [2,3])) dataf = ro.r['data.frame'](**d) L. On Thu, 2008-10-16 at 20:02 +0200, laurent wrote: > > O

Re: [Rpy] build an R DataFrame from a python dictionary in Rpy2

2008-10-16 Thread laurent
On Thu, 2008-10-16 at 10:55 -0400, laurent oget wrote: > In Rpy 1 i c can do > > >>> import rpy > >>> d=dict(x=[1,2],y=[2,3]) > >>> rpy.set_default_mode(rpy.NO_CONVERSION) > >>> df=rpy.r.as_data_frame(d) > >>> df > > > and i can then use this dataframe as an argument for lm > > Is there any w

[Rpy] build an R DataFrame from a python dictionary in Rpy2

2008-10-16 Thread laurent oget
In Rpy 1 i c can do >>> import rpy >>> d=dict(x=[1,2],y=[2,3]) >>> rpy.set_default_mode(rpy.NO_CONVERSION) >>> df=rpy.r.as_data_frame(d) >>> df and i can then use this dataframe as an argument for lm Is there any way to do something similar in rpy2? For the moment the only thing I have found is