getParamNr: Return number of parameters in set.

Description Usage Arguments Value Examples

View source: R/getParamNr.R

Description

Either number of parameters or sum over parameter lengths.

Usage

1
getParamNr(par.set, devectorize = FALSE)

Arguments

par.set

ParamSet
Parameter set.

devectorize

(logical(1))
Sum over length of vector parameters? Default is codeFALSE.

Value

integer.

Examples

1
2
3
4
5
6
ps = makeParamSet(
  makeNumericParam("u"),
  makeDiscreteVectorParam("x", len = 2, values = c("a", "b"))
)
getParamNr(ps)
getParamNr(ps, devectorize = TRUE)

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