Hello, I'm porting over some code from pure R to RPy2.1 (because I'm using R only to perform the calculations, as I much prefer the data in other structures that are more efficient) and I stumbled upon a function (which I didn't originally write) that uses "which".
As far as I can remember, there isn't a perfect equivalent in Python: the alternative would be using "which" with "robjects.r("expressiongoeshere")" but as the object is created "outside" I would like to avoid that. The "offending" code is (in R): length(which(keys == mydata$label)) (mydata is a R list - hence I would be able to use the .rx2 accessor) Has anyone got a hint on how to translate this using rpy 2.1.x? Thanks! -- Luca Beltrame, Ph.D. Post-doctoral research fellow - Duccio Cavalieri group Department of Pharmacology, University of Firenze
signature.asc
Description: This is a digitally signed message part.
------------------------------------------------------------------------------ Throughout its 18-year history, RSA Conference consistently attracts the world's best and brightest in the field, creating opportunities for Conference attendees to learn about information security's most important issues through interactions with peers, luminaries and emerging and established companies. http://p.sf.net/sfu/rsaconf-dev2dev
_______________________________________________ rpy-list mailing list rpy-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rpy-list