Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

secondModes

Most common and second most common values


Description

Identifies the most common (multiple) modes for frequency vectors as well as the second most common values.

Usage

secondModes(V, pos=FALSE, tolerance=0.1)

Arguments

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.

Details

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.

Value

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.

Author(s)

Didier Ruedin

See Also


agrmt

Calculate Concentration and Dispersion in Ordered Rating Scales

v1.42.4
MIT + file LICENSE
Authors
Didier Ruedin [aut, cre] Clem Aeppli [ctb]
Initial release
2020-08-29

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.