Get or set the environment in which code chunks are evaluated.

knit_global(envir = NULL)

Arguments

envir

If NULL, the function returns the envir argument of knit, otherwise it should be a new environment for evaluating code, in which case the function returns the old environment after setting the new environment.