[R] Is there a package for generating standardized R script command line options?
Trevor.L.Davis at frb.gov
Trevor.L.Davis at frb.gov
Wed Nov 25 20:04:00 CET 2009
> Hi,
>
> In python, there is a package that helps generating command line
> options. I am wondering if there is such a package in R that helps
> generating the command options for a R script?
>
> http://docs.python.org/library/optparse.html
>
> Regards,
> Peng
I recently put a package on CRAN that tries to implement much of the
functionality and approach of python's "optparse" library:
http://cran.r-project.org/web/packages/optparse/
It contains a package vignette (use vignette("optparse") after installing
the package) that illustrates an example program using optparse and trying
it with various options on the command line.
The "getopt" package or manually parsing the command line remain good
approaches too.
----------------------------------------------------------------------------
Trevor Davis
Research Assistant
Division of Research & Statistics
Federal Reserve Board of Governors
More information about the R-help
mailing list