Identifies the most common (multiple) modes for frequency vectors as well as the second most common values.
secondModes(V, pos=FALSE, tolerance=0.1)
The function returns a list for the most common and the second most common value(s). The output corresponds to that of the modes
function.
A frequency vector
Categories of frequency vector (optional)
Specify how similar values have to be to be treated as different (optional). Differences smaller than or equal to the tolerance are ignored.
Didier Ruedin
This function identifies which positions of a frequency vector correspond to the mode(s) as implemented in the modes
function. It also reports the second most common position in the same manner.
modes