It has been a while since I wrote this, but here's what I did: ynames=tmp.do_slot('y.names')
My S4 object did not have a period in it. That may complicate things. I know the rpy2 documentation discusses how to deal with this situation, but it seems to be too early in the morning for me to find the exact page right now. I can't remember if you also need a bit of boilerplate code. If so, you might need to do something like the reflection from the rpy2 documentation: http://rpy.sourceforge.net/rpy2/doc-2.1/html/robjects.html Good luck. Mike On 5/5/10, Sebastian Radestock <sebast...@radestock.net> wrote: > Hi all, > > how can I access a single slot of an S4 object within Rpy and Python? > > E.g. the S4 object is tmp, and the slot name is y.names, in R I use > > t...@y.names[[1]] > > Best regards, > Sebastian. > > > ============================================= > Sebastian Radestock, Dipl.-Bioinf. > > Computational Structural Biology Group > Max Planck Institute for Biophysics > Max-von-Laue-Str. 3 > 60438 Frankfurt am Main, Germany > > Tel: +49 (0)69 6303 1603 > Cell: +49 (0)176 6407 2224 > URL: http://www.radestock.net > ============================================= > > ------------------------------------------------------------------------------ > _______________________________________________ > rpy-list mailing list > rpy-list@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/rpy-list > ------------------------------------------------------------------------------ _______________________________________________ rpy-list mailing list rpy-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rpy-list