Learn R Programming

optigrab (version 0.9.2.1)

opt_style: Get or set the optigrab style

Description

Get or sets the optigrab style

Usage

opt_style(style)

Arguments

style

named list; containing the following functions: flag_test, flag_to_name and name_to_flag

If style is not specified, opt_style gets the current optigrab style. If style is provided, it must be a named list containing three functions flag_test, flag_to_name and name_to_flag.

Value

If style is not provided, returns a list of styles, otherwise used for the side-effect of setting the option

flag_test

Accepts a character vector and returns a logical vector indicating whether the elements are flags.

flag_to_name

Accepts a character vector of flags and turns them into variable names, usually by stripping delimiters that indicate that they are flags

name_to_flag

Accepts a character vector of names and transforms them into the flags that would appear on the command line. This is used by opt_grab().

See Also

gnu_style, java_style or ms_style

Examples

Run this code
# NOT RUN {
  opt_style() 
  opt_style( optigrab:::gnu_style )
  opt_style( optigrab:::java_style )
  opt_style( optigrab:::ms_style )
  
# }

Run the code above in your browser using DataLab