Learn R Programming

drake (version 5.2.1)

target: Define custom columns in a drake_plan().

Description

The target() function lets you define custom columns in a workflow plan data frame, both inside and outside calls to drake_plan().

Usage

target(...)

Arguments

...

named arguments specifying fields of the workflow plan. Tidy evaluation will be applied to them, so the !! operator is evaluated immediately for expressions and language objects.

Value

A one-row workflow plan data frame with the named arguments as columns.

See Also

drake_plan(), make()

Examples

Run this code
# NOT RUN {
# Use target() to create your own custom columns in a drake plan.
# See ?triggers for more on triggers.
plan <- drake_plan(
  website_data = target(
    command = download_data("www.your_url.com"),
    trigger = "always",
    custom_column = 5
  ),
  analysis = analyze(website_data),
  strings_in_dots = "literals"
)
plan
# make(plan) # nolint
# Call target() inside or outside drake_plan().
target(
  command = download_data("www.your_url.com"),
  trigger = "always",
  custom_column = 5
)
# }

Run the code above in your browser using DataLab