stats_mode: Statistical mode

View source: R/small-utility-functions.R

stats_modeR Documentation

Statistical mode

Description

Calculate the statistical mode with is strangely missing from base R. In a tie it returns the first of the most common values encountered in the original vector.

Usage

stats_mode(x)

Arguments

x

vector from which to find the most common value

Value

The mode, ie the most common value. In case of ties the return is first in the original vector


MagicForrest/DGVMTools documentation built on Aug. 23, 2024, 8:05 a.m.