concat_pre_processors: bind together blockwise pre-processors

View source: R/pre_process.R

concat_pre_processorsR Documentation

bind together blockwise pre-processors

Description

concatenate a sequence of pre-processors, each previously 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 block indices where each vector in the list contains the global indices of the variables.

Value

a new prepper object

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)

bbuchsbaum/multivarious documentation built on April 15, 2024, 3:33 a.m.