| 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
affect only the selected steps.
pip_view(
x,
i = integer(),
filter = list(),
tags = character(),
fixed = TRUE,
...
)
x |
A pipeflow pipeline or view. |
i |
Optional row indices or step names to keep. |
filter |
A named list of filters to apply. Each element can be a
character vector specifying the values to keep for the corresponding
property or, if |
tags |
Tag filter (character). Keeps steps with any matching tag. |
fixed |
If TRUE, values in |
... |
further args passed to |
A pipeflow_view object.
p <- pip_new()
pip_add(p, "load_raw", \(x = 1) x,
tags = c("io", "core", "daily")
)
pip_add(p, "fit_model", \(x = 2) x + 1,
tags = c("model")
)
pip_add(p, "eval_model", \(x = ~fit_model) x,
tags = c("model", "daily", "report")
)
# Filter by a fixed column value (one or more states)
pip_view(p, filter = list(state = "new"))
# Combine filters: step pattern AND state
pip_view(p, filter = list(step = "model", state = "new"))
# Filter by tag — keeps steps that have *any* of the given tags
pip_view(p, tags = "daily")
# Combine explicit step selection with a filter (intersection)
pip_view(p,
i = c("load_raw", "fit_model"),
filter = list(state = "new")
)
# Select by integer row indices
pip_view(p, i = c(1L, 2L), filter = list(state = "new"))
# Use a regex pattern to match step names
pip_view(p, filter = list(step = "_model$"), fixed = FALSE)
# Views are composable: create a view-of-view for progressive narrowing
v1 <- pip_view(p, tags = "daily")
print(v1) # load_raw, eval_model
v2 <- pip_view(v1, tags = "report")
print(v2) # eval_model only
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.