The arguments are of the form
name = default: type range [^ dimension] [settings]
.
name
is any valid R identifier name.
= default
Determines the 'default' setting
in makeXXXParam
. Note that this is different from an R function parameter
default value, in that it serves only as information to the user and does not set the
parameter to this value if it is not given. To define ‘no default’, use NA
or
leave the “= default” part out. Leaving it out can cause problems when R's static
type checker verifies a package, so this is only recommended for interactive sessions
and top-level applications. (To actually set a parameter default to NA, use (NA)
in parentheses)
type
is one of
“integer”, “numeric”, “logical”, “discrete”, “funct”, “character”, “untyped”.
Each of these types leads to a Param
or LearnerParam
of the given type to be created.
Note that “character” is not available if ‘Learner’-parameters are created.
range
is optional and only used for integer, numeric, and discrete parameters.
For “discrete”, it is either [valuelist]
with valuelist
evaluating to a list,
or of the form [value1, value2, ...]
, creating a discrete parameter of character
or numeric values according to value1
,
value2
etc. If type
is one of “integer” or “numeric”,
range
is of the form [lowBound, upBound]
, where lowBound
and upBound
must either be numerical (or integer) values indicating the
lower and upper bound, or may be missing (indicating the absence of a bound). To indicate
an exclusive bound, prefix the values with a tilde (“~”). For a “numeric” variable, to
indicate an unbounded value which may not be infinite, you can use ~Inf
or ~-Inf
,
or use tilde-dot (“~.”).
^ dimension
is optionally determining the dimension of a ‘vector’ parameter.
If it is absent, the result is a normal Param
or LearnerParam
, if it is present,
the result is a Vector(Learner)Param
. Note that a one-dimensional Vector(Learner)Param
is distinct from a normal (Learner)Param
.
codesettings may be a collection of further settings to supply to makeXXXParam
and is optional. To specify one or more settings, put in double square brackets ([[
, ]]
),
and comma-separate settings if more than one is present.