Execute a parade flow and collect results
collect.parade_flow.RdRuns all stages in a flow, handling dependencies and parallelization according to the flow's distribution settings. Returns a tibble with results from all stages.
Usage
# S3 method for class 'parade_flow'
collect(
x,
engine = c("future", "sequential"),
workers = NULL,
scheduling = 1,
seed_furrr = TRUE,
.progress = interactive(),
limit = NULL,
validate = c("light", "full"),
...
)Arguments
- x
A
parade_flowobject with stages to execute- engine
Execution engine: "future" (default) or "sequential"
- workers
Number of workers for parallel execution
- scheduling
Furrr scheduling parameter (0 < value <= 1 or chunk size)
- seed_furrr
Whether to enable deterministic random number generation
- .progress
Whether to display progress bars (default: interactive())
- limit
Optional limit on number of grid rows to process
- validate
Validation mode for flexible types: "light" (default) or "full"
- ...
Additional arguments passed to the execution function
Examples
# \donttest{
grid <- data.frame(x = 1:3)
fl <- flow(grid) |>
stage("double", function(x) x * 2, schema = returns(result = dbl()))
results <- collect(fl)
#> [parade] Stage 'double' failed after 1 attempt(s): Column 1 must be named.
#> Use `.name_repair` to specify repair.
#> Caused by error in `repaired_names()`:
#> ! Names can't be empty.
#> ✖ Empty name found at location 1.
#> [parade] Stage 'double' failed after 1 attempt(s): Column 1 must be named.
#> Use `.name_repair` to specify repair.
#> Caused by error in `repaired_names()`:
#> ! Names can't be empty.
#> ✖ Empty name found at location 1.
#> [parade] Stage 'double' failed after 1 attempt(s): Column 1 must be named.
#> Use `.name_repair` to specify repair.
#> Caused by error in `repaired_names()`:
#> ! Names can't be empty.
#> ✖ Empty name found at location 1.
# }