Frequently, in RStudio, in a markdown file, I find myself doing command-shift-enter to run the current chunk. This pollutes the global R environment.
Is there anyway I can create a 'current environment' or 'live environment' so that anything that gets run in the console gets attached to that environment and not to the global one?