dr_recipe()
A recipe contains ordered transformations, independently of product identity,
primary inputs, output contracts and destinations. Construction never reads
data. Attach it with
dr_add_recipe() to a product. Recipes are
ordinary R values: adding a step returns a new value and leaves the original
unchanged. Expressions use dplyr data masking and retain their environments.
Usage
dr_recipe()Value
A recipe specification.
Details
These are data preparation instructions, not fitted preprocessing models.
There is no training or implicit
prep()/bake() phase. Use dr_run() on
the assembled workflow to inspect checked output, then dr_publish() to save it.
Examples
preparation <- dr_recipe() |>
dr_step_mutate(amount = round(amount, 2)) |>
dr_step_filter(amount >= 0)
dr_product("orders", data.frame(amount = c(10.123, 20))) |>
dr_add_recipe(preparation) |>
dr_run(write = FALSE, stop_on_failure = FALSE) |>
dr_collect()Documentation source snapshot · View source at d9cb454 ↗
Code examples are documented source examples; they are not executed in this website build.
Code examples are documented source examples; they are not executed in this website build.