Based on codes from 'http://stackoverflow.com/questions/2547402/is-there-a-built-in-function-for-finding-the-mode' see the comment by Rasmus Baath

estimate_mode(x)

Arguments

x

MCMC samples or some numeric or array values.