dot-getModalValue: Get the Modal Value of a Vector

.getModalValueR Documentation

Get the Modal Value of a Vector

Description

This function calculates the modal value of a vector, which is the most frequently occurring value. If the vector is empty or contains only NA values, it returns NA.

Usage

.getModalValue(x)

Arguments

x

A vector of values.

Value

The modal value of the vector. If the vector is empty or contains only NA values, returns NA.


BGmisc documentation built on June 11, 2025, 1:07 a.m.