opt_help {optigrab}R Documentation

Automatic usage/help information

Description

Prints program usage information and, if used non-interactively, exits.

Usage

opt_help(name = c("help", "?"), opts = commandArgs())

Arguments

name

character; vector of names/aliases to use

opts

character; vector from which to parse options (default: commandArgs() )

Usage information is generated from opt_get calls made prior to opt_help. opt_help shused will will not be shown. It is considered best practice to handle all option parsing in a block at the beginning of the application. opt_help() would be best placed at the end of that block

Value

logical; returns TRUE if command-line options contain a help flag, FALSE otherwise. Mainly opt_help is used for side-effects of printing usage/help information,

See Also

base::commandArgs()

Examples

  opts <- c( "--foo", "bar")
  optigrab:::opt_grab( "--foo")
  optigrab:::opt_help()


[Package optigrab version 0.9.2.1 Index]