Skip to contents

Apply sw_pipeline() to multiple subjects in one call. Accepts either a named list of [N x Tmax] matrices or a 3-D array [N x Tmax x subjects].

Usage

batch_sw(data, window, ...)

Arguments

data

Named list of [N x Tmax] matrices, or a 3-D array [N, Tmax, subjects]. See batch_leida().

window

Integer. Window size in timepoints passed to sw_pipeline().

...

Additional arguments passed to sw_pipeline().

Value

Named list of dynR_sw objects, one per subject.

Examples

set.seed(2)
ts_list <- list(
  sub01 = matrix(rnorm(10 * 200), nrow = 10),
  sub02 = matrix(rnorm(10 * 200), nrow = 10)
)
results <- batch_sw(ts_list, window = 20, filter = FALSE)
names(results)
#> [1] "sub01" "sub02"