ParamHelpers (version 1.12)

checkParamSet: Sanity check expressions of a parameter set.

Description

Checks whether the default values of the numerical parameters are located within the corresponding boundaries. In case of discrete parameters it checks whether the values are a subset of the parameter's possible values.

Usage

checkParamSet(par.set, dict = NULL)

Arguments

par.set

[ParamSet] Parameter set.

dict

[environment | list | NULL] Environment or list which will be used for evaluating the variables of expressions within a parameter, parameter set or list of parameters. The default is NULL.

Value

[TRUE] on success. An exception is raised otherwise.

Examples

Run this code
# NOT RUN {
ps = makeParamSet(
  makeNumericParam("u", lower = expression(p)),
  makeIntegerParam("v", lower = 1, upper = expression(3 * p)),
  makeDiscreteParam("w", default = expression(z), values = c("a", "b")),
  makeDiscreteParam("x", default = "a", values = c("a", "b")),
  keys = c("p", "z")
)
checkParamSet(ps, dict = list(p = 3, z = "b"))
# }

Run the code above in your browser using DataLab