OptionParser | R Documentation |
This function is used to create an instance of a parser object
which when combined with the parse_args
, make_option
, and add_option
methods is very useful for parsing options from the command line.
OptionParser(
usage = "usage: %prog [options]",
option_list = list(),
add_help_option = TRUE,
prog = NULL,
description = "",
epilogue = "",
formatter = IndentedHelpFormatter
)
usage |
The program usage message that will printed out if
|
option_list |
A list of of |
add_help_option |
Whether a standard help option should be automatically
added to the |
prog |
Program name to be substituted for |
description |
Additional text for |
epilogue |
Additional text for |
formatter |
A function that formats usage text.
The function should take only one argument (an |
An instance of the OptionParser
class.
Trevor Davis.
Python's optparse
library, which inspired this package,
is described here: https://docs.python.org/3/library/optparse.html
parse_args
make_option
add_option
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.