Learn R Programming

ParamHelpers (version 1.1-36)

makeParamSet: Construct a parameter set.

Description

makeParamSet: Contruct from a bunch of parameters.

makeNumericParamSet: Convenience function for numerics.

Usage

makeParamSet(..., params)

makeNumericParamSet(id = "x", len, lower = -Inf, upper = Inf, vector = TRUE)

Arguments

...
[Param] Parameters.
params
[list of Param] List of parameters, alternative way instead of using ....
id
[character(1)] Name of parameter.
len
[integer(1)] Length of vector.
lower
[numeric] Lower bound. Default is -Inf.
upper
[numeric] Upper bound. Default is Inf.
vector
[logical(1)] Should a NumericVectorParam be used instead of n NumericParam objects? Default is TRUE.

Value

Details

Multiple sets can be concatenated with c.

The constructed S3 class is simply a list that contains the element pars. pars is a list of the passed parameters, named by their ids.

Examples

Run this code
makeParamSet(
  makeNumericParam("u", lower=1),
  makeIntegerParam("v", lower=1, upper=2),
  makeDiscreteParam("w", values=1:2),
  makeLogicalParam("x"),
  makeDiscreteVectorParam("y", len=2, values=c("a", "b"))
)

Run the code above in your browser using DataLab