Skip to content
Prev 76557 / 398502 Next

access to on.exit expressions in parent frames?

In R, sys.on.exit() retrieves the expression stored for use by 'on.exit' in
the function currently being evaluated.  In S, you get the list of expressions
for the current frame and its parents.  Is there any way I can do the same in
R?  If not, can this be added?  Maybe 'sys.on.exit' could take a frame number
or environment as an argument.

Jeff