math mode for math

Returns the most frequent element(s) from a list of numbers or tables.

Signature

> math mode

Input/output types:

inputoutput
list<duration>list<duration>
list<filesize>list<filesize>
list<number>list<number>
tablerecord

Examples

Compute the mode(s) of a list of numbers

> [3 3 9 12 12 15] | math mode
╭───┬────╮
│ 03 │
│ 112 │
╰───┴────╯

Compute the mode(s) of the columns of a table

> [{a: 1 b: 3} {a: 2 b: -1} {a: 1 b: 5}] | math mode
╭───┬────────────╮
│   │ ╭───┬───╮  │
│ a │ │ 01 │  │
│   │ ╰───┴───╯  │
│   │ ╭───┬────╮ │
│ b │ │ 0-1 │ │
│   │ │ 13 │ │
│   │ │ 25 │ │
│   │ ╰───┴────╯ │
╰───┴────────────╯