Useful if vectors are included.

getParamIds(par, repeated = FALSE, with.nr = FALSE)

Arguments

par

(Param | ParamSet)
Parameter or parameter set.

repeated

(logical(1))
Should ids be repeated length-times if parameter is a vector? Default is FALSE.

with.nr

(logical(1))
Should number from 1 to length be appended to id if repeated is TRUE? Otherwise ignored. Default is FALSE.

Value

character.

Examples

ps = makeParamSet(
  makeNumericParam("u"),
  makeIntegerVectorParam("v", len = 2)
)
getParamIds(ps)
#> [1] "u" "v"
getParamIds(ps, repeated = TRUE)
#> [1] "u" "v" "v"
getParamIds(ps, repeated = TRUE, with.nr = TRUE)
#> [1] "u"  "v1" "v2"