most.common.element: Find the most common element(s) in a single vector.

View source: R/clanToolsFunctions.R

most.common.elementR Documentation

Find the most common element(s) in a single vector.

Description

Find the most common element(s) in a single vector This functions also handles NULL vectors and NA-values.

Usage

xx <- c(NA,1:100,NA)
most.common.element(xx,1)

Arguments

x

is the vector

max.number.of.elements

is the limit elements in the return vector

Value

The most common element in the vector

Author(s)

Claus E. Andersen


claus-e-andersen/clanTools documentation built on Nov. 30, 2024, 11:06 p.m.