How to clean up environment bindings in knitr sub modules?

This post discusses the management of the environment while running different
parts of the code. The author’s desire is to:

  • Obtain a list of bindings before execution sub-module
  • Execute the code in the sub-module
  • Upon completion of the sub-mode code execution remove anything that was added
    to the environment

Can definitely understand the desire. The approach makes total sense.

Perhaps now is the time for me to learn more about packages and whether that would be
a good approach here. Even running everything inside of a local block could be
an option perhaps?

Leave a Reply

Your email address will not be published. Required fields are marked *