Hi Peter, thanks for the reply.

Following your tips, o got good results with:

from rpy2 import robjects
robjects.r('x=1:10')
robjects.r('y=runif(10)')
print robjects.r('ls()')
aa=robjects.r('x')
print aa
robjects.r('mydf=data.frame(cbind(x,y))')
print robjects.r('ls()')
mydf_onpython=robjects.r('mydf')
print mydf_onpython

Thanks a lot!

milton


2009/8/14 Peter <rpy-l...@maubp.freeserve.co.uk>

> On Fri, Aug 14, 2009 at 10:57 PM, Milton Cezar Ribeiro wrote:
> > I also tryed to get back on python environment
> > the results of ls() read from R, but I get error.
> >
> >    import rpy2.robjects as robjects
> >    print robjects.["ls()"]
>
> That looks wrong, it isn't valid python syntax. Also for calling
> functions in Python use round brackets, square brackets (generally)
> are for indexing.
>
> Peter
>
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus
> on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> rpy-list mailing list
> rpy-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rpy-list
>
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
rpy-list mailing list
rpy-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rpy-list

Reply via email to