Bioconductor is using so-called "S4 objects" .
Handling them in rpy2 is straightforward.

L.

PS: I am working on a bioconductor extension to rpy2,
which may make the jump (even more) worthy.

PPS: I had CLASS_CONVERSION issues in the past and did not manage to 
overcome them.



Nick Schurch wrote:
> HI all,
> 
> I'm having some problems understanding how to access data inside a
> dataframe with rpy.
> 
> I have a dataframe called 'genedata' with columns like '$R', '$G' and
> '$Genes' and I want to be able to pass a specific column as a
> parameter to a new R function. I've had a look at the manual and I
> think I should be using something like
> 
> selecteddata = r['$'](genedata, R)
> 
> to pull out the specific data I want, but when I try this I get the
> following error
> 
> rpy.RPy_TypeConversionException: cannot convert from type 'classobj'
> 
> I've tried adding  '.as_py(CLASS_CONVERSION)' to the end of this but
> it still fails. Ultimately what I want to do is give this data to
> another command. In R I'd say:
> 
> datanorm<-normalizeBetweenArrays(genes$R, method="quantile")
> 
> 
> so actually I don't really want to convert the robj to a python object
> - I just want to know how I can reference the data within the
> dataframe. Any help would be greatly appreciated.
> 


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
rpy-list mailing list
rpy-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rpy-list

Reply via email to