gives a list of the elements that are the most common in list.
gives a list of the n most common elements in list.
- When several elements occur with equal frequency, Commonest[list,…] picks first the ones that occur first in list.
- Commonest[list,n] returns the n commonest elements in the order they appear in list.
- Commonest[list,UpTo[n]] returns the n commonest elements, or as many as are available.
Basic Examples (3)
Obtain the elements with the highest frequency:
Obtain the 4 most common elements:
Obtain the 6 most common elements, or as many as there are if fewer:
Properties & Relations (1)
Introduced in 2007
Updated in 2015