Given a suitable data structure that provides long and short-form command-line option names, whether
arguments are mandatory, optional or not required (as for flags), and a data-type,
getopt munges the command-line arguments supplied by the user and fills a new variable
opt accordingly. If a fifth columns with help text is provided, a usage string can be
generated as well.
Thanks to Allen for writing getopt, for accepting a quick two-line patch extending support from Rscript to littler, and for fixing one or two minor bugs. Thanks also to the Debian ftpmasters for adding r-cran-getopt within a few days.