get_arg | R Documentation |
Getting Argument From System, Option or Default
get_arg(opt = NULL, sys = NULL, default = NULL, split = ";")
opt |
( |
sys |
( |
default |
value to return if neither the environment variable nor the option are set. |
split |
( |
if defined, the value of the option (opt
), a character
from the environment variable (sys
) or the
default
in this order of priority.
get_arg("my.option", "MY_ARG", "default")
withr::with_envvar(c(MY_ARG = "x;y"), get_arg("my.option", "MY_ARG", "default"))
withr::with_options(c(my.option = "y"), get_arg("my.option", "MY_ARG", "default"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.