This is an internal utility function to compute the mode(s) of a discrete distribution.
Arguments
- x
A vector or matrix of discrete values.
- na.rm
A logical value indicating whether NA values should be stripped before the computation proceeds (default: TRUE).
Author
Simon Garnier, garnier@njit.edu