Calculate the Mode of a Factor Variable with Optional Priors
getMode(v, prior)The mode of the factor v as a character string. If all values are
NA, the function returns NA.
A factor or vector that can be coerced into a factor. The mode will be calculated from the levels of this factor.
A numeric vector of prior weights for each level of the factor.