Calculates the mode, the most frequent value, of a variable x. This makes mostly sense for qualitative data.
a (non-empty) numeric vector of data values.
logical. Should missing values be removed? Defaults to FALSE.
Returns the most frequent value. If there are more than one, all of them are returned in a vector.
Consider using density(x)$x[which.max(density(x)$y)] for quantitative data or alternatively use hist().
Another interesting idea:
1 2 3 4 5 6
Andri Signorell <[email protected]>
1 2 3 4 5
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.