optparse: Command line option parser.
Version 1.0.2

A command line parser inspired by Python's 'optparse' library to be used with Rscript to write "#!" shebang scripts that accept short and long flag/options.

Browse man pages Browse package API and functions Browse package files

AuthorTrevor L Davis. Some documentation and examples ported from Allen Day's getopt package. Some documentation from the optparse Python module by the Python Software Foundation. Contributions from Steve Lianoglou and Jim Nikelski.
Date of publication2013-04-29 01:55:14
MaintainerTrevor L Davis <trevor.l.davis@stanford.edu>
LicenseGPL (>= 2)
Version1.0.2
URL http://r-forge.r-project.org/projects/optparse
Package repositoryView on R-Forge
InstallationInstall the latest version of this package by entering the following in R:
install.packages("optparse", repos="http://R-Forge.R-project.org")

Man pages

add_make_option: Functions to enable our OptionParser to recognize specific...
OptionParser: A function to create an instance of a parser object
optparse-package: Command line option parser
parse_args: Parse command line options.
print_help: Printing an usage message from an OptionParser object

Functions

OptionParser Man page Source code
add_option Man page Source code
convert_to_getopt Source code
expand_short_option Source code
get_long_options Source code
get_option_strings_and_n_arguments Source code
get_short_options Source code
make_option Man page Source code
optparse Man page
optparse-package Man page
parse_args Man page Source code
print_help Man page Source code
requires_argument Source code
s_long_flag Source code
s_option_string Source code
s_short_flag Source code

Files

DESCRIPTION
LICENSE
NAMESPACE
NEWS
R
R/optparse-package.R
R/optparse.R
exec
exec/display_file.R
exec/example.R
inst
inst/doc
inst/doc/optparse.R
inst/doc/optparse.Rnw
inst/doc/optparse.pdf
inst/tests
inst/tests/test-optparse.R
man
man/OptionParser.Rd
man/add_make_option.Rd
man/optparse-package.Rd
man/parse_args.Rd
man/print_help.Rd
tests
tests/run-all.R
optparse documentation built on May 21, 2017, 3:54 a.m.