quick question.  how do I search up the calling environments until I find a
variable?

> x=function() { m=22; y() }
> y=function() { z() }
> z=function() { mget("m", inherits=TRUE, ifnotfound="m not found") }
> x()
$m
[1] "m not found"

from the perspective of z(), function x is not an enclosing environment.
 do I write a while loop to look back, or is there a standard R function
that searches all calling environments until it finds one that works?

regards,

/iaw
----
Ivo Welch (ivo.welch@gmail.com)

	[[alternative HTML version deleted]]

