Skip to contents

concatenate a sequence of pre-processors, each applied to a block of data.

Usage

concat_pre_processors(preprocs, block_indices)

Arguments

preprocs

a list of initialized pre_processor objects

block_indices

a list of integer vectors specifying the global column indices for each block

Value

a new pre_processor object that applies the correct transformations blockwise

Examples


p1 <- center() |> prep()
p2 <- center() |> prep()

x1 <- rbind(1:10, 2:11)
x2 <- rbind(1:10, 2:11)

p1a <- init_transform(p1,x1)
p2a <- init_transform(p2,x2)

clist <- concat_pre_processors(list(p1,p2), list(1:10, 11:20))
t1 <- apply_transform(clist, cbind(x1,x2))

t2 <- apply_transform(clist, cbind(x1,x2[,1:5]), colind=1:15)
#> Warning: `apply_transform()` was deprecated in multivarious 0.3.0.
#>  Please use `transform()` instead.
#>  apply_transform() is deprecated. Use transform() for a more standard
#>   interface.
#>  The deprecated feature was likely used in the multivarious package.
#>   Please report the issue to the authors.