process_qsm_dir: process_qsm_dir

View source: R/struct_funcs.r

process_qsm_dirR Documentation

process_qsm_dir

Description

Runs analyze_cyl_file on all files in a directory

Usage

process_qsm_dir(
  qsm_path = ".",
  parallel_process = T,
  cyl_file_pat = "cyl.*.txt",
  rename_pat = "",
  recursive = F,
  file_batching = 0
)

Arguments

qsm_path

PARAM_DESCRIPTION

parallel_process

PARAM_DESCRIPTION, Default: T

cyl_file_pat

PARAM_DESCRIPTION, Default: 'cyl.*.txt'

rename_pat

Regex applied to filenames when naming ouput list elements (sub(rename_pat, '\1', filename))

recursive

PARAM_DESCRIPTION, Default: F

file_batching

Number of files to process per batch, or 0 to process all at once, Default: 0

Details

This routine provides a facility to name each element of the list based on the name of the corresponding cyl file. Use rename_pat parameter to customize the renaming. File batching can be used to avoid memory errors, etc

Value

list, one element per cyl file, of outputs from analyze_cyl_file

Examples

## Not run: 
if(interactive()){
 #EXAMPLE1
 }

## End(Not run)

ashenkin/treestruct documentation built on June 11, 2025, 10:40 a.m.