Extracts the positional arguments stored in the "operands" attribute of the
object returned by getopt().
Arguments
- x
An object of class "getopt" as returned by getopt().
Value
A character vector of positional arguments.
Examples
spec <- matrix(c("verbose", "v", 0, "logical"), ncol = 4, byrow = TRUE)
opt <- getopt(spec, c("--verbose", "--", "file1.txt", "file2.txt"))
getoperand(opt)
#> [1] "file1.txt" "file2.txt"