Converts a character vector of CLI-style arguments into a data frame with fields for position, argument name, value, number of hyphens, and whether the argument used an equals sign.
Value
A data frame with one row per parsed argument and the following columns:
- argpos
The index of the original string in the input vector.
- lhs
The left-hand side of the argument (name).
- rhs
The right-hand side of the argument (value), or
NAif none found.- has_equals
Logical;
TRUEif the argument used=, otherwiseFALSE.- nhyphens
The number of hyphens used in the argument prefix (1 or 2).