Hello,

thanks from the help on this ML, porting is going on fast. However I've 
again(!) stumbled upon something that is not very evident (at least to me): 
null results.

In R, accessing non existent items from a list yields a NULL result, and since 
some of the methods I use can or can not return something, I check for the 
result using is.null(). 

Simple use case

test_list <- list(a="some_value", b="other_value")

test_list[["c"]]
NULL

However, rpy2 returns a RObject which is not None (obviously) but can't be 
tested for such a thing, unless I do:

importr("base")
base.is_null(test_list.rx2("c"))
True

Is there another way to go around this problem or should I stick with this 
solution for now?

Thanks.

-- 
Luca Beltrame, Ph.D.  - luca.beltr...@unifi.it
Post-doctoral research fellow - Duccio Cavalieri group
Department of Pharmacology, University of Firenze

Attachment: signature.asc
Description: This is a digitally signed message part.

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
rpy-list mailing list
rpy-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rpy-list

Reply via email to