On 21/07/10 16:54, rey sebastien wrote:
> Hello guys,
> I'm having some trouble to understand the mapping with rpy2 object and
> python object.
>
> I have a function(x) which return a tuple object in python, and i want
> to map this tuple object with R object list or vector.
> _
> First, i'm trying to do this : _
>
> robjects.r.tlist = get_max_ticks(x) # return a tuple into this object tlist
>
> #Convert list into dataframe
> r('x <- as.data.frame(tlist,row.names=c("seed","ticks"))')
>
> FAIL with error :
> rinterface.RRuntimeError: Error in eval(expr, envir, enclos) : object
> 'tlist' not found
> _
> So i'm trying an other strategy : _
>
> robjects.r["tlist"] = get_max_ticks(x)
> r('x <- as.data.frame(tlist,row.names=c("seed","ticks"))')
>
>
> FAIL with this error :
> TypeError: 'R' object does not support item assignment
>
> Could you help me to understand ?What about starting with the documentation ? http://rpy.sourceforge.net/rpy2/doc-2.1/html/robjects.html#creating-objects > Thanks a lot !! > > ------ > S.Rey > Phd @ "geographie-cités" Paris > > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by Sprint > What will you do first with EVO, the first 4G phone? > Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first > > > > _______________________________________________ > rpy-list mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/rpy-list ------------------------------------------------------------------------------ This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first _______________________________________________ rpy-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/rpy-list
