parse_args {optparse}R Documentation

Parse command line options.

Description

parse_args parses command line options using an OptionParser instance for guidance.

Usage

parse_args(object, args = commandArgs(TRUE), print_help_and_exit=TRUE)

Arguments

object An OptionParser instance.
args A character string containing command line options to be parsed. Default is everything after the Rscript program in the command line.
print_help_and_exit Whether parse_args should call print_help to print out a usage message and exit the program. Default is TRUE.

Value

Returns a list containing option values.

Author(s)

Trevor Davis.

The documentation for Python's optparse library, which this package is based on, is Copyright 1990-2009, Python Software Foundation.

References

Python's optparse library, which this package is based on, is described here: http://docs.python.org/library/optparse.html

See Also

OptionParser print_help OptionParser


[Package optparse version 0.8 Index]