Learn R Programming

targets (version 0.0.0.9000)

tar_option_get: Get a target option.

Description

Get a target option. These options include default arguments to tar_target() such as packages, storage format, iteration type, and cue. Needs to be called before any calls to tar_target() in order to take effect.

Usage

tar_option_get(option)

Arguments

option

Character of length 1, name of an option to get. Must be one of the argument names of tar_option_set().

Value

Value of a target option.

Details

This function goes well with tar_target_raw() when it comes to defining external interfaces on top of the targets package to create pipelines.

Examples

Run this code
# NOT RUN {
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 the format
tar_target(x, 1)$settings$format
# }

Run the code above in your browser using DataLab