get_output_opt()
and set_output_opt()
get and set loopurrr's output options. They are light
wrappers around getOption("loopurrr.output")
and options("loopurrr.output")
.
default_context()
inspects if the "loopurrr.output"
option is set. If the option is not
specified, it will default to c("rstudio", "clipboard", "console")
. If "console"
is not
among the output options it will be automatically included as last option.
Usage
get_output_opt(default = NULL)
set_output_opt(x = list("rstudio", "clipboard", "console", NULL))
default_context()
Arguments
- default
If the specified option is not set in the options list, this value is returned. This argument is for internal use only.
- x
Either
NULL
or one or several of"rstudio"
,"clipboard"
,"console"
. If set to more than one option, the output options will be run in order from left to right until successful.
Value
For get_output_opt()
, the current value set for option "loopurrr.output"
, or default
(which defaults to NULL) if the option is unset.
For default_context()
, either the current value set for option "loopurrr.output"
.
In this case, if "console"
is not among the options, it will be automatically included as last
option. Or, if option "loopurrr.output"
is not specified c("rstudio", "clipboard", "console")
.
Examples
set_output_opt(c("clipboard", "rstudio"))
get_ouptut_opt()
#> [1] "clipboard" "rstudio"
default_context()
#> [1] "clipboard" "rstudio" "console"