Calculates the mode, the most frequent value, of a variable x. This makes mostly sense for qualitative data. If there are more than one mode, all of them are returned in a vector. Modified from DescTools::Mode
1 |
x |
vector containing numeric information. To do: Modify to allow for character information! |
na.rm |
logical. Defaults to FALSE. |
multiple |
logical. Defaults to FALSE. If FALSE, return a vector containing ALL possible modes. If TRUE, function returns the 'mean' of the mode values for numeric vectors if the difference between the two modes is 1; if there are multiple differences or if the difference between two modes is > 1, then return NA to indicate that no 'numeric' mode can be imputed. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.