get_mode | R Documentation |
A convenience function that returns the mode
get_mode(x, na.rm = TRUE)
x |
The dataframe or vector for which the mode is required. |
na.rm |
Logical. Should 'NA's be dropped? Defaults to 'TRUE' |
Useful when used together with get_stats in a pipe fashion. These functions are for exploratory data analysis The smallest number is returned if there is a tie in values The function is currently slow for greater than 300,000 rows. It may take up to a minute. may work with inaccuracies. By default, NAs are discarded.
a data.frame or vector showing the mode of the variable(s)
test<-c(1,2,3,3,3,3,4,5)
test2<-c(455,7878,908981,NA,456,455,7878,7878,NA)
get_mode(test)
get_mode(test2)
## Not run:
mtcars %>%
get_data_Stats(get_mode)
get_data_Stats(mtcars,get_mode)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.