File: formatter.Rd

package info (click to toggle)
r-cran-optparse 1.7.5-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 324 kB
  • sloc: sh: 9; makefile: 2
file content (32 lines) | stat: -rw-r--r-- 1,032 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/optparse.R
\name{IndentedHelpFormatter}
\alias{IndentedHelpFormatter}
\alias{TitledHelpFormatter}
\title{Builtin help text formatters}
\usage{
IndentedHelpFormatter(object)

TitledHelpFormatter(object)
}
\arguments{
\item{object}{An \code{\link[=OptionParser]{OptionParser()}} object.}
}
\value{
\code{NULL} invisibly.  As a side effect prints out help text.
}
\description{
\code{IndentedHelpFormatter()} is the default help text formatter.
\code{TitledHelpFormatter()} is an alternative help text formatter.
}
\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)
}