getoperand: Extract positional arguments from a getopt result

View source: R/getopt.R

getoperandR Documentation

Extract positional arguments from a getopt result

Description

Extracts the positional arguments stored in the "operands" attribute of the object returned by getopt().

Usage

getoperand(x)

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)

getopt documentation built on April 28, 2026, 1:07 a.m.