pipe_collect_out | R Documentation |
Collects output afer pipeline run, by default, from all
steps for which keepOut
was set to TRUE
when steps were added
(see pipe_add()
). The output is grouped by the group names (see
group
parameter in pipe_add()
),
which by default are set identical to the step names.
pipe_collect_out(pip, groupBy = "group", all = FALSE)
pip |
|
groupBy |
|
all |
|
list
containing the output, named after the groups, which,
by default, are the steps.
p <- pipe_new("pipe", data = 1:2)
pipe_add(p, "step1", \(x = ~data) x + 2)
pipe_add(p, "step2", \(x = ~step1) x + 2, keepOut = TRUE)
pipe_run(p)
pipe_collect_out(p)
pipe_collect_out(p, all = TRUE) |> str()
# Grouped output
p <- pipe_new("pipe", data = 1:2)
pipe_add(p, "step1", \(x = ~data) x + 2, group = "add")
pipe_add(p, "step2", \(x = ~step1, y = 2) x + y, group = "add")
pipe_add(p, "step3", \(x = ~data) x * 3, group = "mult")
pipe_add(p, "step4", \(x = ~data, y = 2) x * y, group = "mult")
p
pipe_run(p)
pipe_collect_out(p, all = TRUE) |> str()
# Grouped by state
pipe_set_params(p, list(y = 5))
p
pipe_collect_out(p, groupBy = "state", all = TRUE) |> str()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.