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
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/convertDiscrete.R
\name{discreteNameToValue}
\alias{discreteNameToValue}
\title{Convert encoding name(s) to discrete value(s).}
\usage{
discreteNameToValue(par, name)
}
\arguments{
\item{par}{\link{Param}\cr
Parameter.}
\item{name}{(\code{character})\cr
Name (string) encoding the value for a discrete
parameter, or a character vector of names for a discrete vector.}
}
\value{
\link{any}. Parameter value for a discrete parameter or a list of values
for a discrete vector.
}
\description{
For a discrete parameter or discrete vector. If the \code{name} is
\code{NA}, indicating a missing parameter value due to unsatisfied requirements,
\code{NA} is returned.
}
\examples{
p = makeDiscreteParam("u", values = c(x1 = "a", x2 = "b", x3 = "b"))
discreteNameToValue(p, "x3")
}
|