tar_option_with: Locally set target options.

View source: R/tar_option_with.R

tar_option_withR Documentation

Locally set target options.

Description

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 of expression.

envir_with

Environment to evaluate expression.

Value

NULL (invisibly).

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

targets documentation built on April 12, 2025, 1:11 a.m.