I just noticed that import rpy2.rinterface as ri s_int = ri.SexpVector([1], ri.INTSXP) # works s_list = ri.SexpVector([s_int], ri.LISTSXP) # appears to work, but the R object is NULL/Nil
Two issues here: 1) It looks like rinterface.c:newSEXP is trying to throw an exception rather than silently pass a Nil sexp back out to Python, but somehow no exception is being raised. 2) It would be nice if we could create lists directly like this... though a workaround is to use ri.globalEnv.get("list")(*contents) For instance, the numpy support currently included in rpy2.robjects attempts to create lists with ri.SexpVector like this. I don't have time to write a patch right now (and am not caught up to tip anyway), but may get to it later if no-one beats me to it. Cheers, -- Nathaniel ------------------------------------------------------------------------------ Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensign option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects _______________________________________________ rpy-list mailing list rpy-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rpy-list