mode_stat: Calculate the statistical mode of an atomic vector

View source: R/utils.R

mode_statR Documentation

Calculate the statistical mode of an atomic vector

Description

Returns the statistical mode of an atomic vector (can be numeric, character or factor).

Usage

mode_stat(x, multiple = TRUE, na.rm = TRUE)

Arguments

x

An atomic vector.

multiple

Logical. If TRUE returns a vector of modes, or just the first otherwise.

na.rm

Logical. Indicates whether to ignore NAs.

Details

From https://stackoverflow.com/questions/2547402/is-there-a-built-in-function-for-finding-the-mode.


jedwards24/edwards documentation built on Sept. 2, 2023, 8:16 a.m.