% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils_class.R
\name{.replaceMissingWithFirst}
\alias{.replaceMissingWithFirst}
\title{Replace with first choice}
\usage{
.replaceMissingWithFirst(x, field, choices)
}
\arguments{
\item{x}{An instance of a \linkS4class{Panel} class.}

\item{field}{String containing the name of the relevant slot.}

\item{choices}{Character vector of permissible values for this slot.}
}
\value{
\code{x} where the slot named \code{field} is replaced with \code{choices[1]} if its value was previously \code{NA} or did not exist in \code{choices}.
}
\description{
Replace an \code{NA} or invalid value in a slot of a \linkS4class{Panel} object with the first valid choice.
This is usually called in \code{\link{.refineParameters}}.
}
\author{
Aaron Lun
}
