formatter: Builtin help text formatters

IndentedHelpFormatterR Documentation

Builtin help text formatters

Description

IndentedHelpFormatter() is the default help text formatter. TitledHelpFormatter() is an alternative help text formatter.

Usage

IndentedHelpFormatter(object)

TitledHelpFormatter(object)

Arguments

object

An OptionParser() object.

Value

NULL invisibly. As a side effect prints out help text.

Examples

 parser <- OptionParser(formatter = IndentedHelpFormatter)
 parser <- add_option(parser, "--generator", help = "Generator option")
 parser <- add_option(parser, "--count", help = "Count option")
 print_help(parser)

 parser <- OptionParser(formatter = TitledHelpFormatter)
 parser <- add_option(parser, "--generator", help = "Generator option")
 parser <- add_option(parser, "--count", help = "Count option")
 print_help(parser)

optparse documentation built on June 24, 2024, 5:17 p.m.