Computes the `sample mode', i.e. the most frequently occurring value in x. Among values occurring equally frequently, Mode()
chooses the
smallest one (for a numeric vector), one with a smallest absolute value
(for complex ones) or the first occurring value (for factor levels).
A matrix will be changed to a vector.