modal_value: Find the modal (most frequent) value in a numeric vector

View source: R/utils-checks.R

modal_valueR Documentation

Description

Returns the most common value in a vector. Used to infer the expected inter-sample interval directly from the data in a way that is robust to a minority of irregular intervals (e.g., dropped samples).

Usage

modal_value(x)

Arguments

x

A numeric vector.

Value

The most frequently occurring (finite) value in x, or NA_real_ if x contains no finite values.


eyeris documentation built on Aug. 1, 2026, 1:07 a.m.