why does EnvironmentSexp_ass_subscript (==
rpy2.rinterface.SexpEnvironment.__setitem__) copy the value it is
storing?:

  PROTECT(sexp_copy = Rf_duplicate(sexp));
  Rf_defineVar(sym, sexp_copy, rho_R);

I noticed this because I was trying to get dim<- to work on an
SexpVector -- r["dim<-"](mysexp, newdim) doesn't work (more about that
in a follow-up note), and the workaround would be something like
  globalEnv["mysexp"] = mysexp
  globalEnv["newdim"] = newdim
  r("dim(mysexp) <- newdim")
But that is thwarted by the above call to Rf_duplicate. I guess I
could do the above and then
  mysexp = globalEnv["mysexp"]
but that seems silly.

-- Nathaniel

------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
rpy-list mailing list
rpy-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rpy-list

Reply via email to