checkParamSet: Sanity check expressions of a parameter set.

View source: R/checkParamSet.R

checkParamSetR Documentation

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

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"))

berndbischl/ParamHelpers documentation built on Oct. 25, 2022, 10:49 p.m.