View source: R/tar_option_reset.R
tar_option_reset | R Documentation |
Reset all target options you previously chose with
tar_option_set()
. These options are mostly configurable default
arguments to tar_target()
and tar_target_raw()
.
tar_option_reset()
NULL
(invisibly).
Other configuration:
tar_config_get()
,
tar_config_projects()
,
tar_config_set()
,
tar_config_unset()
,
tar_config_yaml()
,
tar_envvars()
,
tar_option_get()
,
tar_option_set()
tar_option_get("format") # default format before we set anything
tar_target(x, 1)$settings$format
tar_option_set(format = "fst_tbl") # new default format
tar_option_get("format")
tar_target(x, 1)$settings$format
tar_option_reset() # reset all options
tar_target(x, 1)$settings$format
if (identical(Sys.getenv("TAR_EXAMPLES"), "true")) { # for CRAN
tar_dir({ # tar_dir() runs code from a temp dir for CRAN.
tar_script({
library(targets)
library(tarchetypes)
tar_option_set(cue = tar_cue(mode = "always"))
tar_option_reset() # Undo option above.
list(tar_target(x, 1), tar_target(y, 2))
})
tar_make()
tar_make()
})
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.