Mode {cumstats} | R Documentation |
This function computes the statistical mode of given data.
Mode(x)
x |
a numeric or character vector. |
A list containing the following components:
Values |
of statistical mode(s) found, in the order they appear in |
Frequency |
number of times the mode(s) appear in |
NA
values are also considered.
Ian Castillo.
Kotz, S., Balakrishnan, N., Read, C.B, Vidakovic, B., Johnson, N.L. (2006) Encyclopedia of Statistical Sciences. Wiley, New Jersey.
Mode(c(rep(1, 2), rep(12, 5), rep(44, 3), rep(8, 5), 55))
Mode(c(rep(1, 2), rep(12, 5), rep(44, 3), rep(8, 5), rep(NA, 7), 55))
Mode(runif(5))
Mode(c(rep("a", 2), rep("b", 5), rep("d", 3), rep("e", 5), rep(NA, 5)))