Function reference · Statistics

mode

Finds the most frequently occurring value.

mode counts exact expression values and returns the most frequent one. When multiple values tie for highest frequency, the result remains symbolic instead of arbitrarily selecting one.

Examples

These examples use Nerdamer Notation.

Find the unique most frequent value.

mode(2,3,2,4)
// → 2

Interfaces

The same operation is available through the interfaces below.

Nerdamer Notation · nerdamer API · Direct API

Nerdamer Notation

Use this form inside input passed to nerdamer(...).

mode(arg1, ...)

nerdamer.mode

Call the operation through the default nerdamer import.

nerdamer.mode(...args: StatisticsInput[]): Expression

Parameters

NameTypeDescription
argsStatisticsInput[]—

Returns

Expression

Browse the nerdamer API →

Direct JavaScript / TypeScript API

Import the operation directly from its package entry point.

import { mode } from 'nerdamer/statistics';
mode(...args: StatisticsInput[]): Expression

Parameters

NameTypeDescription
argsStatisticsInput[]—

Returns

Expression

Browse nerdamer/statistics →

← Back to Function reference