split_step: Split combined pipeline step

View source: R/split_step.R

split_stepR Documentation

Split combined pipeline step

Description

Some methods perform multiple steps of a pipeline. This function assists with splitting the combined pipeline step into multiple steps with duplicated method names.

Usage

split_step(x, step, into)

Arguments

x

a results data.frame from 'apply_methods()'.

step

the name of the column to split.

into

the name of the columns to split into.

Value

a results data.frame where the 'step' column has been split into the 'into' columns with duplicated values.

Examples

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)

res %>%
    split_step("add_noise", c("split1", "split2"))

Shians/CellBench documentation built on Oct. 16, 2023, 7:54 a.m.