Param | R Documentation |
For each parameter type a special constructor function is available, see below.
For the following arguments you can also pass an expression
instead of a
concrete value: default
, len
, lower
, upper
, values
. These
expressions can depend on arbitrary symbols, which are later filled in /
substituted from a dictionary, in order to produce a concrete valu, see
evaluateParamExpressions()
. So this enables data / context dependent
settings, which is sometimes useful.
The S3 class is a list which stores these elements:
character(1)
)See argument of same name.
character(1)
)Data type of parameter. For all type string see (getTypeStringsAll())
integer(1)
| expression
)See argument of same name.
numeric
| expression
)See argument of same name. Length of this vector is len
.
numeric
| expression
)See argument of same name. Length of this vector is len
.
list
| expression
)Discrete values, always stored as a named list.
character
See argument of same name.
logical(1)
)See argument of same name.
NULL
| function(x)
)See argument of same name.
NULL
| expression
)See argument of same name.
expression
)See argument of same name.
logical(1)
)Extra flag to really be able to check whether the user passed a default, to avoid troubles with NULL
and NA
.
logical(1)
)See argument of same name.
list
)See argument of same name.
makeNumericParam( id, lower = -Inf, upper = Inf, allow.inf = FALSE, default, trafo = NULL, requires = NULL, tunable = TRUE, special.vals = list() ) makeNumericVectorParam( id, len, lower = -Inf, upper = Inf, cnames = NULL, allow.inf = FALSE, default, trafo = NULL, requires = NULL, tunable = TRUE, special.vals = list() ) makeIntegerParam( id, lower = -Inf, upper = Inf, default, trafo = NULL, requires = NULL, tunable = TRUE, special.vals = list() ) makeIntegerVectorParam( id, len, lower = -Inf, upper = Inf, cnames = NULL, default, trafo = NULL, requires = NULL, tunable = TRUE, special.vals = list() ) makeLogicalParam( id, default, requires = NULL, tunable = TRUE, special.vals = list() ) makeLogicalVectorParam( id, len, cnames = NULL, default, requires = NULL, tunable = TRUE, special.vals = list() ) makeDiscreteParam( id, values, trafo = NULL, default, requires = NULL, tunable = TRUE, special.vals = list() ) makeDiscreteVectorParam( id, len, values, trafo = NULL, default, requires = NULL, tunable = TRUE, special.vals = list() ) makeFunctionParam( id, default = default, requires = NULL, special.vals = list() ) makeUntypedParam( id, default, requires = NULL, tunable = TRUE, special.vals = list() ) makeCharacterParam(id, default, requires = NULL, special.vals = list()) makeCharacterVectorParam( id, len, cnames = NULL, default, requires = NULL, special.vals = list() )
id |
( |
lower |
( |
upper |
( |
allow.inf |
( |
default |
(any concrete value | |
trafo |
( |
requires |
( |
tunable |
( |
special.vals |
( |
len |
( |
cnames |
( |
values |
( |
[Param()
].
makeNumericParam("x", lower = -1, upper = 1) makeNumericVectorParam("x", len = 2) makeDiscreteParam("y", values = c("a", "b")) makeCharacterParam("z")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.