sample_mode: Returns the mode of a vector

Description Usage Arguments Value Examples

View source: R/sample_mode.R

Description

Returns the mode of a vector

Usage

1
sample_mode(x, na.rm = FALSE)

Arguments

x

A list of values

na.rm

Should NAs be removed? FALSE by default

Value

Returns the mode of x, either a numeric if x is a list of numerics, or a character if x is a list of characters

Examples

1
2
x <- c(3,3,3,4,5,NA, NA, NA, NA, NA)
sample_mode(x, na.rm = TRUE)

b-rodrigues/brotools documentation built on April 21, 2020, 2:27 p.m.