File: checkParamSet.Rd

package info (click to toggle)
r-cran-paramhelpers 1.14.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 992 kB
  • sloc: ansic: 102; sh: 13; makefile: 2
file content (35 lines) | stat: -rw-r--r-- 1,194 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/checkParamSet.R
\name{checkParamSet}
\alias{checkParamSet}
\title{Sanity check expressions of a parameter set.}
\usage{
checkParamSet(par.set, dict = NULL)
}
\arguments{
\item{par.set}{\link{ParamSet}\cr
Parameter set.}

\item{dict}{(\code{environment} | \link{list} | \code{NULL})\cr
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 \code{NULL}.}
}
\value{
\code{\link{TRUE}} on success. An exception is raised otherwise.
}
\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.
}
\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"))
}