Description Usage Arguments Value Examples
This function only exists for optimization purposes. The function takes an argument vector (string vector) and a position vector (resulting form a call to find_args) and sorts the position vector according to the argument strings. Eg, if the arguments are '-b', '-a' then the result would be c(2, 1). If the arguments are 'c', '-b', '-a' then the result is c(3, 2). Sorting arguments allows a single iteration over each vector when matching the arguments.
1 | order_args(args, argPos, includeNext = FALSE, lastPos = Inf)
|
args |
commandline argument (usually from commandArgs(TRUE)). |
argPos |
argument position vector, see |
includeNext |
logical indicator, if TRUE the next position of argPos is included as an attribute "next" |
lastPos |
The final position within args, usually length(args) |
integer vector that gives the numeric order of the indices in the input vector.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.