parseFilenames: Parse filenames by pattern matching.

Description Usage Arguments Value

View source: R/util.R

Description

Parse filenames by pattern matching.

Usage

1
parseFilenames(filenames, pattern)

Arguments

filenames

Character vector of filenames to parse.

filename.pattern

Filename pattern, which must be a valid Perl regex with named capture groups. Neither the capture groups nor the regex itself are required to match any given filename, but all capture groups must have a unique name.

Value

Character matrix in which each row contains the values of capture groups for a given filename, and each column contains values of a given capture group across files. Unmatched capture groups are represented by NA values.


gact/shmootl documentation built on Nov. 11, 2021, 6:23 p.m.