Pull output-path options out of the command-line arguments
Source:R/results.R
parse_output_options.RdThe counterpart to parse_sampler_options() for the output
flags: --results PATH (where the amended workbook goes), --csv PATH (also
write a results-only CSV), and --overwrite (allow replacing existing
outputs). Each path flag may be written --csv PATH or --csv=PATH.
Unrecognized arguments are left in rest for the caller.
Value
A list with options (a named list holding any of results, csv,
and overwrite) and rest (the arguments with the recognized output flags
and their values removed).
Examples
parse_output_options(c("data.xlsx", "--csv", "out.csv", "--overwrite"))
#> $options
#> $options$csv
#> [1] "out.csv"
#>
#> $options$overwrite
#> [1] TRUE
#>
#>
#> $rest
#> [1] "data.xlsx"
#>