dominant(x)
This is a helper method used to return the dominant class of a classified variable. This is equivalent to median for a numeric variable.
dominant(sample(letters, 100, replace=T)) [1] "n"