ltxttab: Loads and conconcatenates multiple text-table output files

View source: R/luna.R

ltxttabR Documentation

Loads and conconcatenates multiple text-table output files

Description

Loads and concatenates text-table format Luna (-t mode) output

Usage

ltxttab(root, f = "", ids = dir(root), silent = F)

Arguments

root

a required parameter, the folder containing the output

f

(optional) the name of the file to load from each subfolder of root

ids

(optional) to specify that only a subset of individuals are loaded (subfolder names are expected to correspond to IDs)

silent

(optional) if set to true makes this function runs silently (not output to console)

Value

a data.frame containing row-concatenated data from the subfolders of root

Examples

## Not run: 
## this luna command will make a out1 subfolder
## % luna s.lst -t out1 -s 'MASK ifnot=NREM2 & RE & PSD spectrum sig=EEG'

## % ls out1/
##  nsrr01  nsrr02  nsrr03

## each subfolder will contain iodentical file names.
## % ls out1/nsrr01
##  MASK-EPOCH_MASK.txt  PSD-B,CH.txt  PSD-CH.txt  PSD-F,CH.txt  RE.txt

## get an enumeration of all files
> ltxttab("out1")
MASK-EPOCH_MASK.txt        PSD-B,CH.txt          PSD-CH.txt        PSD-F,CH.txt
                  3                   3                   3                   3
RE.txt
     3

## to load all PSD-B,CH.txt files:
> d <- ltxttab("out1", "PSD-B,CH.txt")
> table(d$ID)
nsrr01 nsrr02 nsrr03
    10     10     10

## End(Not run)


remnrem/luna documentation built on June 1, 2025, 2:14 p.m.