Most common and second most common values
Identifies the most common (multiple) modes for frequency vectors as well as the second most common values.
secondModes(V, pos=FALSE, tolerance=0.1)
V |
A frequency vector |
pos |
Categories of frequency vector (optional) |
tolerance |
Specify how similar values have to be to be treated as different (optional). Differences smaller than or equal to the tolerance are ignored. |
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.
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.
Didier Ruedin
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.