Description Usage Arguments Examples
Determines the most common element(s)
1 2  | 
x | 
 A numeric vector.  | 
use_mode | 
 A logical indicating whether to use   | 
return_single | 
 A logical indicating whether a single value should return even if several elements of   | 
na.rm | 
 A logical value indicating whether NA values should be stripped before the computation proceeds.  | 
seed | 
 An integer value or   | 
1 2 3 4 5 6 7 8 9  | x1 <- c(rep(NA, 3), 1:4)
x2 <- c(rep(1/3, 3), 1:4, rep(NA, 3))
majority(x1)
majority(x1, na.rm = TRUE)
majority(x1, return_single = FALSE, na.rm = TRUE)
majority(x1, use_mode = FALSE, return_single = FALSE, na.rm = TRUE)
majority(x1, use_mode = FALSE, return_single = TRUE, na.rm = TRUE)
majority(x1, use_mode = FALSE, return_single = FALSE, na.rm = FALSE)
majority(x2, return_single = FALSE)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.