Run the native pipeline on all files in a directory
Source:R/pipeline.R
run_pipeline_native_batch.RdApplies run_pipeline_native() to every file matching pattern in
folder, returning a named list of zeitr_result objects. Files that
fail are skipped with a warning.
Arguments
- folder
character(1). Path to a directory of ActTrust files.- pattern
character(1). Glob pattern. Default"*.txt".- parallel
logical(1). IfTRUE, processes files in parallel usingfuture.apply::future_lapply()(aSuggests-only dependency). Requires afuture::plan()to be set beforehand, e.g.future::plan(future::multisession(workers = 4)); falls back to sequential processing with a warning iffuture.applyis not installed. DefaultFALSE.- ...
Additional arguments forwarded to
run_pipeline_native().
Examples
if (FALSE) { # \dontrun{
results <- run_pipeline_native_batch("recordings/", tz = "America/Sao_Paulo")
lapply(results, function(r) r$nights)
# Parallel: process a large cohort across 4 workers
future::plan(future::multisession(workers = 4))
results <- run_pipeline_native_batch("recordings/", tz = "America/Sao_Paulo",
parallel = TRUE)
} # }