Often when using evaluate()
you are running R code with a specific output
context in mind. But there are many options and env vars that packages
will take from the current environment, meaning that output depends on
the current state in undesirable ways.
This function allows you to describe the characteristics of the desired output and takes care of setting the options and environment variables for you.
Usage
local_reproducible_output(
width = 80,
color = FALSE,
unicode = FALSE,
hyperlinks = FALSE,
rstudio = FALSE,
frame = parent.frame()
)
Arguments
- width
Value of the
"width"
option.- color
Determines whether or not cli/crayon colour should be used.
- unicode
Should we use unicode characaters where possible?
- hyperlinks
Should we use ANSI hyperlinks?
- rstudio
Should we pretend that we're running inside of RStudio?
- frame
Scope of the changes; when this calling frame terminates the changes will be undone. For expert use only.