pipeline_collapse {CellBench} | R Documentation |
Collapse benchmark_tbl into two columns: "pipeline" and "result". The "pipeline" column will be the concatenated values from the data and methods columns while the "result" column remains unchanged from the benchmark_tbl. This is useful for having a string summary of the pipeline for annotating.
pipeline_collapse( x, sep = arrow_sep("right"), drop.steps = TRUE, data.name = TRUE )
x |
the benchmark_tbl to collapse |
sep |
the separator to use for concatenating the pipeline steps |
drop.steps |
if the data name and methods steps should be dropped from the output. TRUE by default. |
data.name |
if the dataset name should be included in the pipeline string. Useful if only a single dataset is used. |
benchmark_tbl with pipeline and result columns (and all other columns if drop.steps is FALSE)
# list of data datasets <- list( set1 = rnorm(500, mean = 2, sd = 1), set2 = rnorm(500, mean = 1, sd = 2) ) # list of functions add_noise <- list( none = identity, add_bias = function(x) { x + 1 } ) res <- apply_methods(datasets, add_noise) pipeline_collapse(res)