secondModes {agrmt}R Documentation

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

modes


[Package agrmt version 1.42.12 Index]