modalvalue {rattle} | R Documentation |
The mode is the most common or modal value of a list. This function calculates the mode of a vector, array or list (lists are flattened).
modalvalue(x, na.rm=FALSE)
x |
A vector, array or list. |
na.rm |
Whether to remove missing values. |
Rattle needed this function, and R does not provide one. This version came from the R Wiki.
R Wiki: http://wiki.r-project.org/rwiki/doku.php?id=tips:stats-basic:modalvalue