Thanks much!  Should have searched harder I guess.

MJ

-----Original Message-----
From: laurent [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, October 28, 2008 2:08 PM
To: Mark Janikas
Cc: RPy help, support and design discussion list
Subject: Re: [Rpy] DataFrame



On Tue, 2008-10-28 at 13:35 -0700, Mark Janikas wrote:
> In rpy you were able to create a dataframe from a dictionary.  Is
> there a way to do that in rpy2?  It appears you need to use a
> taggedlist now.  Any info would be greatly appreciated.  TY,

This was discussed recently on the mailing-list.
http://article.gmane.org/gmane.comp.python.rpy/1344

> 
> MJ
> 
>  
> 
> EXAMPLE:
> 
>  
> 
> In [29]: from rpy import *
> 
> In [30]: set_default_mode(NO_CONVERSION)
> 
> In [31]: d = {"Test":[1,2,3], "This":[4,5,6]}
> 
> In [32]: rd = rpy.r.data_frame(d)
> 
> In [33]: rd
> 
> Out[33]: <Robj object at 0x00B65240>
> 
>  
> 
>  
> 
> In [34]: import rpy2.robjects as RO
> 
> In [35]: rd2 = RO.RDataFrame(d)
> 
> ---------------------------------------------------------------------------
> 
> ValueError                                Traceback (most recent call
> last)
> 
> C:\Data\Test\MedianCenter\<ipython console> in <module>()
> 
> C:\Python25\Lib\site-packages\rpy2\robjects\__init__.py in
> __init__(self, tlist)
> 
>  
> 
>     340                              " an instance of
> rpy2.rlike.container.Tagge
> 
> dList" +
> 
>     341                              " or an instance of
> rpy2.rinterface.SexpVec
> 
> tor" +
> 
> --> 342                              " of type VECSXP.")
> 
>     343
> 
>     344     def nrow(self):
> 
>  
> 
> ValueError: tlist can be either an instance of
> rpy2.rlike.container.TaggedList o
> 
> r an instance of rpy2.rinterface.SexpVector of type VECSXP.
> 
>  
> 
>  
> 
> Mark Janikas
> 
> Product Engineer
> 
> ESRI, Geoprocessing
> 
> 380 New York St.
> 
> Redlands, CA 92373
> 
> 909-793-2853 (2563)
> 
> [EMAIL PROTECTED]
> 
> 
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________ rpy-list mailing list 
> rpy-list@lists.sourceforge.net 
> https://lists.sourceforge.net/lists/listinfo/rpy-list



-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
rpy-list mailing list
rpy-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rpy-list

Reply via email to