calc_mode: Calculate mode

Description Usage Arguments Value Examples

View source: R/helpers.R

Description

Calculates the mode of a given vector.

Usage

1

Arguments

x

Any kind of vector — numeric, character, logical.

Value

The mode(s) of that vector.

Examples

1
2
3
calc_mode(c(1, 1, 2, 3, 4))
calc_mode(c('the', 'quick', 'brown', 'fox', 'jumped', 'over', 'the', 'lazy', 'dog'))
calc_mode(c(TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE))

upstartr documentation built on Feb. 23, 2021, 9:06 a.m.