knit_global: The global environment for evaluating code

View source: R/utils.R

knit_globalR Documentation

The global environment for evaluating code

Description

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

Usage

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.


knitr documentation built on Sept. 7, 2026, 1:07 a.m.