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(x)
x | character array, can also be a factor |
---|
a 1-length character of the dominant class
dominant(sample(letters, 100, replace=T))#> [1] "m"