the function runs interactively and
FALSE when it runs in batch
mode. It also checks, in this order:
rlang_interactive global option. If set to a single
is_interactive() returns that value immediately. This
escape hatch is useful in unit tests or to manually turn on
interactive features in RMarkdown outputs.
Whether knitr, an RStudio notebook, or testthat is in progress.
scoped_interactive() set the global
is_interactive() scoped_interactive(value = TRUE, frame = caller_env()) with_interactive(expr, value = TRUE)
The environment of a running function which defines the scope of the temporary options. When the function returns, the options are reset to their original values.
An expression to evaluate with interactivity set to