> Good to see Bioconductor veterans here ! ;-) Hah. :)
I hadn't realized until after I sent my message that you're the main developer for Rpy2. I stumbled across Rpy2 after stumbling across Rpy after looking into Duncan's RSPython package. > > Is this expected behavior (True replacing NA)? > Definitely not. This is a bug. Ok, good to know. I can (and did) branch by looking to see if the return was bool or str, but it seemed odd that this owuld be the return. :) > I am also getting: > >>> robjects.r('NA')[0] > True So does this imply that R's NA objects always evaluate as Python's True right now? What is (or should be) the equivalent to a NA value in Python? > 1) To a large extent, there is no scalar value in R, only length-one > vectors. > For example, in R: > > length(NA) > [1] 1 > For automagic subsetting of length-one vectors, you can try tweaking the > robjects-level converter like shown here: > http://rpy.sourceforge.net/rpy2/doc/html/robjects_convert.html#a-simple-example Gotcha. Makes sense & not a real issue. I just wanted to make sure that I wasn't missing out on a less verbose way to do things. As it was I couldn't use the normal Rpy2 environment processing as the annotation packages now use Bimap objects instead of environments. Thanks -J ------------------------------------------------------------------------------ This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword _______________________________________________ rpy-list mailing list rpy-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rpy-list