pipeline_collapse: Collapse benchmark_tbl into a two column summary

Description Usage Arguments Value See Also Examples

View source: R/utils.R

Description

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.

Usage

1
2
3
4
5
6
pipeline_collapse(
  x,
  sep = arrow_sep("right"),
  drop.steps = TRUE,
  data.name = TRUE
)

Arguments

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.

Value

benchmark_tbl with pipeline and result columns (and all other columns if drop.steps is FALSE)

See Also

as_pipeline_list

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# 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)

CellBench documentation built on Nov. 8, 2020, 5:11 p.m.