get_mode | R Documentation |
Returns the mode of a factor or integer
get_mode(x, na.exclude = TRUE, getlast = TRUE, retain.class = TRUE)
x |
Vector, factor or integer: Input data |
na.exclude |
Logical: If TRUE, exclude NAs |
getlast |
Logical: If TRUE, get |
retain.class |
Logical: If TRUE, output is always same class as input |
The mode of x
E.D. Gennatas
x <- c(9, 3, 4, 4, 0, 2, 2, NA)
get_mode(x)
x <- c(9, 3, 2, 2, 0, 4, 4, NA)
get_mode(x)
get_mode(x, getlast = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.