View source: R/jofou_utilities.R
calculate_mode | R Documentation |
Calculate mode of a caracter variable present in a data set.
calculate_mode(x)
x |
A variable. |
Data must have a categorical variable you want to know the most frequent value.
library(tidyverse) iris %>% mutate(cat_Sepal.Length=round(Sepal.Length, digits = 0)) %>% group_by(cat_Sepal.Length) %>% summarise(mode_species=calculate_mode(Species))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.