checkParamSet: Sanity check expressions of a parameter set.

Description Usage Arguments Value Examples

View source: R/checkParamSet.R

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

1
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

1
2
3
4
5
6
7
8
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"))

ParamHelpers documentation built on March 26, 2020, 7:40 p.m.