This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
 BUILT-IN MATHEMATICA SYMBOL See Also »| More About »

# Commonest

 Commonest[list] gives a list of the elements that are the most common in list. Commonestgives a list of the n most common elements in list.
• When several elements occur with equal frequency, Commonest picks first the ones that occur first in list.
• Commonest returns the n commonest elements in the order they appear in list.
Obtain the elements with the highest frequency:
Obtain the 4 most common elements:
Obtain the elements with the highest frequency:
 Out[1]=

Obtain the 4 most common elements:
 Out[1]=
 Scope   (1)
Elements of the list can be any expressions:
 Applications   (1)
Find the mode of a set of random integers:
Find the most frequently occurring elements in the columns of a matrix:
Commonest gives elements with the largest Tally values:
A message is generated if there are fewer distinct elements than requested:
New in 6