Define a parameter used in a module

Share:

Description

Used to specify a parameter's name, value, and set a default.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
defineParameter(name, class, default, min, max, desc)

## S4 method for signature 'character,character,ANY,ANY,ANY,character'
defineParameter(name,
  class, default, min, max, desc)


  ## S4 method for signature 'character,character,ANY,missing,missing,character'
defineParameter(name,
  class, default, desc)

## S4 method for signature 'missing,missing,missing,missing,missing,missing'
defineParameter()

Arguments

name

Character string giving the parameter name.

class

Character string giving the parameter class.

default

The default value to use when none is specified by the user. Non-standard evaluation is used for the expression.

min

With max, used to define a suitable range of values. Non-standard evaluation is used for the expression.

max

With min, used to define a suitable range of values. Non-standard evaluation is used for the expression.

desc

Text string providing a brief description of the parameter.

Value

data.frame

Author(s)

Alex Chubaty

Examples

1
2
3
4
parameters = rbind(
  defineParameter("lambda", "numeric", 1.23, desc = "intrinsic rate of increase"),
  defineParameter("P", "numeric", 0.2, 0, 1, "probability of attack")
)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.