Learn R Programming

ParamHelpers (version 1.1-36)

discreteValueToName: Convert discrete value(s) to encoding name(s).

Description

If the value x is NA, indicating a missing parameter value due to unsatisfied requirements, NA is returned.

Usage

discreteValueToName(par, x)

Arguments

par
[Param] Discrete parameter or discrete vector.
x
[any] Parameter value or a list of values for a discrete vector.

Value

  • [character]. Single name for a discrete parameter or a character vector of names for a discrete vector.

Examples

Run this code
p <- makeDiscreteParam("u", values=c(x1="a", x2="b", x3="c"))
discreteValueToName(p, "b")

Run the code above in your browser using DataLab