drake (version 7.5.2)

target: Define custom columns in a drake_plan().

Description

Not a user-side function. Please use from within drake_plan() only.

Usage

target(command = NULL, ...)

Arguments

command

The command to build the target.

...

Named arguments specifying non-standard fields of the workflow plan.

Value

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

Keywords

drake_plan() understands special keyword functions for your commands. With the exception of target(), each one is a proper function with its own help file.

  • target(): declare more than just the command, e.g. assign a trigger or transform. Examples: https://ropenscilabs.github.io/drake-manual/plans.html#large-plans. # nolint

  • file_in(): declare an input file dependency.

  • file_out(): declare an output file to be produced when the target is built.

  • knitr_in(): declare a knitr file dependency such as an R Markdown (*.Rmd) or R LaTeX (*.Rnw) file.

  • ignore(): force drake to entirely ignore a piece of code: do not track it for changes and do not analyze it for dependencies.

  • no_deps(): tell drake to not track the dependencies of a piece of code. drake still tracks the code itself for changes.

  • drake_envir(): get the environment where drake builds targets. Intended for advanced custom memory management.

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.
drake_plan(
  website_data = target(
    download_data("www.your_url.com"),
    trigger = "always",
    custom_column = 5
  ),
  analysis = analyze(website_data)
)
# }

Run the code above in your browser using DataLab