This is crazy, and just out of intellectual curiosity: Can I run a function in R in such a way that after the function completes I can get all variables created when the function executed? So the ability to look into a function right before it returned? I don’t mean entering the function in debug mode.
Share
I’m not sure if this is what you want, but maybe close.
You can embed an arbitral expression in existing functions by
trace: