Description Usage Arguments Details See Also Examples
Numeric vectors can be given as arguments in two ways: (1) separated by blanks or (2) separated by other common separators, such as comma (,). This function parses a string, or a string vector into a numeric vector of expected length. In addition it is failure safe: user can specify the return value in case the parsing was not successful,
1 | parseNumVec(str, expLen = 2, failVal = c(5, 5), sep = ",")
|
str |
A character string |
expLen |
Integer or |
failVal |
If the parsing failed (for example length not correct, or non-numeric values were provided, this value will be returned |
sep |
Separator in the character string, default "," |
The input value mostly comes from return values of the argGet
function.
1 | parseNumVec("3,7,9", expLen=3)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.