Locally set target options for the duration of an expression, without permanently modifying the global state.
Usage
tar_option_with(expression, ..., envir_with = parent.frame())
Arguments
- expression
An R expression to run with the local option.
- ...
Named arguments to
tar_option_set()
to temporarily set for the duration ofexpression
.- envir_with
Environment to evaluate
expression
.
See also
Other configuration:
tar_config_get()
,
tar_config_projects()
,
tar_config_set()
,
tar_config_unset()
,
tar_config_yaml()
,
tar_envvars()
,
tar_option_get()
,
tar_option_reset()
,
tar_option_set()
Examples
tar_option_with(
tar_target(data, get_data()),
packages = "dplyr",
cue = tar_cue(mode = "never")
)
#> <tar_stem>
#> name: data
#> description:
#> command:
#> get_data()
#> format: rds
#> repository: local
#> iteration method: vector
#> error mode: stop
#> memory mode: auto
#> storage mode: worker
#> retrieval mode: auto
#> deployment mode: worker
#> priority: 0
#> resources:
#> list()
#> cue:
#> seed: TRUE
#> file: TRUE
#> iteration: TRUE
#> repository: TRUE
#> format: TRUE
#> depend: TRUE
#> command: TRUE
#> mode: never
#> packages:
#> dplyr
#> library:
#> NULL