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()

Value

NULL (invisibly).

See also

Examples

tar_option_get("format") # default format before we set anything
#> [1] "rds"
tar_target(x, 1)$settings$format
#> [1] "rds"
tar_option_set(format = "fst_tbl") # new default format tar_option_get("format")
#> [1] "fst_tbl"
tar_target(x, 1)$settings$format
#> [1] "fst_tbl"
tar_option_reset() # reset all options tar_target(x, 1)$settings$format
#> [1] "rds"
if (identical(Sys.getenv("TAR_EXAMPLES"), "true")) { tar_dir({ # tar_dir() runs code from a temporary directory. tar_script({ 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() }) }