parseArgStrings: Process Command Line Arguments

Description Usage Arguments Value Examples

Description

generic function for parsing delimited lists from BATCH mode argument strings.

Usage

1
parseArgString(string, delimiter=',', min.param.ct=2, max.param.ct=2, param.range=NULL)

Arguments

string

string to parse.

delimiter

how the string is delmited into a vector.

min.param.ct

minimum number of parameters in the vector.

max.param.ct

maximum number of parameters in the vector.

param.range

the range of the parameter values.

Value

a vector or value that has been check for validity

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## passes
parseArgString('apple,banana,pear', param.range=c("apple","banana","pear","pineapple"))
parseArgString('1,2,3', param.range=c(1,4))


## fails
## Not run: 
parseArgString('apple,banana,pear', param.range=c("apple","banana"))
parseArgString('1,2,3', param.range=c(1,2))

## End(Not run)

caroline documentation built on May 1, 2019, 9:19 p.m.