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,

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]<mailto:[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

Reply via email to