Replace an NA
or invalid value in a slot of a Panel object with the first valid choice.
This is usually called in .refineParameters
.
.replaceMissingWithFirst(x, field, choices)
An instance of a Panel class.
String containing the name of the relevant slot.
Character vector of permissible values for this slot.
x
where the slot named field
is replaced with choices[1]
if its value was previously NA
or did not exist in choices
.