ParseUnitName: Produce a vector of file names parsed out of a pattern and...

Description Usage Arguments Value Examples

Description

This function parses each component of a vector of file names with a pattern filling out the corresponding codes with the input metavalues.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
ParseUnitName(UnitNames, MetaValues)

## S4 method for signature 'character,RepoTimeInt'
ParseUnitName(UnitNames, MetaValues)

## S4 method for signature 'character,integer'
ParseUnitName(UnitNames, MetaValues)

## S4 method for signature 'character,character'
ParseUnitName(UnitNames, MetaValues)

Arguments

UnitNames

Character vector with the names of the files to parse.

MetaValues

Object of the appropriate class (RepoTimeInt, integer, ...) with the values of the metacharacters to be parsed.

Value

Return a vector with each component of the input vector UnitNames parsed according to the input parameter MetaValues.

Examples

1
2
3
4
5
6
ParseUnitName(c('dat[mm][aa].sas7bdat'), RepoTime::newRepoTime(c('MM122015', 'MM012016', 'MM022016')))
ParseUnitName(c('dat[mm][aa].sas7bdat', 'in[aaaa][mm].txt'), 
              RepoTime::newRepoTime(c('MM122015', 'MM012016', 'MM022016')))
ParseUnitName(c('PONALI_[ccaa]'), c(paste0(0, 1:9), 10:12))
ParseUnitName(c('primeraDepu_[NombreEdit]', 'ultimaDepu_[NombreEdit]'), c('logCNPR', 'logEX', 'Range'))
      

david-salgado/StQ documentation built on Aug. 12, 2021, 3:23 p.m.