Learn R Programming

drake (version 7.5.2)

transform_plan: Transform a plan

Description

Evaluate the map(), cross(), split() and combine() operations in the transform column of a drake plan.

Usage

transform_plan(plan, envir = parent.frame(), trace = FALSE,
  max_expand = NULL, tidy_eval = TRUE)

Arguments

plan

A drake plan with a transform column

envir

Environment for tidy evaluation.

trace

Logical, whether to add columns to show what happens during target transformations.

max_expand

Positive integer, optional upper bound on the lengths of grouping variables for map() and cross(). Comes in handy when you have a massive number of targets and you want to test on a miniature version of your workflow before you scale up to production.

tidy_eval

Logical, whether to use tidy evaluation (e.g. unquoting/!!) when resolving commands. Tidy evaluation in transformations is always turned on regardless of the value you supply to this argument.

Details

https://ropenscilabs.github.io/drake-manual/plans.html#large-plans # nolint

Examples

Run this code
# NOT RUN {
plan1 <- drake_plan(
  y = target(
    f(x),
    transform = map(x = c(1, 2))
  ),
  transform = FALSE
)
plan2 <- drake_plan(
  z = target(
    g(y),
    transform = map(y, .id = x)
  ),
  transform = FALSE
)
plan <- bind_plans(plan1, plan2)
transform_plan(plan)
# }

Run the code above in your browser using DataLab