| pip_view | R Documentation |
Creates a filtered view showing only a selected subset of steps.
A view references the underlying pipeline without copying it, so
operations like pip_run() and pip_set_params() applied to a view
work directly on the underlying pipeline, but are restricted to the
steps defined by the view.
pip_view(x, ..., join = c("intersect", "union"), fixed = TRUE)
x |
A pipeflow pipeline or view. |
... |
Named filters, which can be one or more of |
join |
How individual filters are combined:
|
fixed |
If TRUE, values in |
A view keeps covering its steps when steps are added, removed, renamed or replaced, also through the pipeline or another view. Removed steps drop out of the view, and new steps are not added to it, even if they match the filters.
A view: a pipeflow object that shares the pipeline's state and
covers the selected steps.
p <- pip_new() |>
pip_add("load", \(a = 1) a, tags = c("io", "core", "daily")) |>
pip_add("fit", \(b = 2) b + 1, tags = c("model")) |>
pip_add("eval_fit", \(fit = ~fit) fit,
tags = c("model", "daily", "report")
)
p
# Filter by one or more column values
pip_view(p, state = "new")
pip_view(p, step = c("load", "fit"))
# Filter by tag — keeps steps that have *any* of the given tags
pip_view(p, tags = "daily")
# Combine filters: step pattern AND state (logical AND)
pip_view(p, step = "fit", state = "new")
# Combine filters as a union (step OR state)
pip_view(p, step = "load", tags = "report", join = "union")
# Use a regex pattern
pip_view(p, step = "fit$", fixed = FALSE)
# Filter by parameter names — steps with any of the given parameters
pip_view(p, params = c("a", "fit"))
# Views are composable: create a view-of-view for progressive narrowing
v1 <- pip_view(p, tags = "daily")
print(v1) # load, eval_fit
v2 <- pip_view(v1, tags = "report")
print(v2) # eval_fit only
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.