parseArgString {caroline}R Documentation

Process Command Line Arguments

Description

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

Usage

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


## 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)


[Package caroline version 0.9.2 Index]