Skip to content
Prev 33695 / 63424 Next

Basic Question regarding PROTECT

Thank you. So the reason I wouldnt need to protect y had I returned to
R, is because
had i had done something like

h<-.Call("boo",a)
where "boo" contains y=foo()

the assignment "<-" to h would have a PROTECT somewhere, i.e R's
assignment is doing the protection for me.
Had I not returned to R, I would have to do it myself.

Yes PROTECT is quite cheap, I had thought it to be costly but 1MM
PROTECT/UNPROTECT calls, takes <1 second  (on a macbook 2.16ghz)

Thanks for the explanation.
Regards
Saptarshi
On Mon, Aug 24, 2009 at 9:24 AM, Duncan Murdoch<murdoch at stats.uwo.ca> wrote: