enve.cliopts {enveomics.R}R Documentation

Enveomics: Cliopts

Description

Generates nicely formatted command-line interfaces for functions (closures only).

Usage

enve.cliopts(
  fx,
  rd_file,
  positional_arguments,
  usage,
  mandatory = c(),
  vectorize = c(),
  ignore = c(),
  number = c(),
  defaults = list(),
  o_desc = list(),
  p_desc = ""
)

Arguments

fx

Function for which the interface should be generated.

rd_file

(Optional) .Rd file with the standard documentation of the function.

positional_arguments

(Optional) Number of positional arguments passed to parse_args (package: optparse).

usage

(Optional) Usage passed to OptionParser (package: optparse).

mandatory

Mandatory arguments.

vectorize

Arguments of the function to vectorize (comma-delimited). If numeric, use also number.

ignore

Arguments of the function to ignore.

number

Force these arguments as numerics. Useful for numeric vectors (see vectorize) or arguments with no defaults.

defaults

Defaults to use instead of the ones provided by the formals.

o_desc

Descriptions of the options. Help from rd is ignored for arguments present in this list.

p_desc

Description Description of the function. Help from rd is ignored for the function description unless this value is an empty string.

Value

Returns a list with keys:

Author(s)

Luis M. Rodriguez-R [aut, cre]


[Package enveomics.R version 1.9.1 Index]