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

discreteNameToValue {ParamHelpers} | R Documentation

## Convert encoding name(s) to discrete value(s).

### Description

For a discrete parameter or discrete vector. If the `name` is `NA`, indicating a missing parameter value due to unsatisfied requirements, `NA` is returned.

### Usage

    discreteNameToValue(par, name)

### Arguments

`par` | Param Parameter.
`name` | (`character`) Name (string) encoding the value for a discrete parameter, or a character vector of names for a discrete vector.

### Value

any. Parameter value for a discrete parameter or a list of values for a discrete vector.

### Examples

    p = makeDiscreteParam("u", values = c(x1 = "a", x2 = "b", x3 = "b"))
    discreteNameToValue(p, "x3")

[Package ParamHelpers version 1.14 Index]