Get or set the environment in which code chunks are evaluated.
Arguments
- envir
If
NULL, the function returns theenvirargument ofknit, otherwise it should be a new environment for evaluating code, in which case the function returns the old environment after setting the new environment.