Learn R Programming

optparse (version 0.8)

parse_args: 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.

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