most.freq: Return most frequent numbers

Description Usage Arguments Value Examples

View source: R/helper.r

Description

get the n most frequent elements in an array

Usage

1
most.freq(x, n = 1)

Arguments

x

an array of elements

n

integer, default is 1

Value

the most n elements

Examples

1
2
most.freq(c('a', 'a', 'b', 'b', 'b', 'c'), n = 2)
most.freq(c(1, 1, 2, 3, 3, 3, 4, 4), n = 2)

gen5helper documentation built on March 26, 2020, 7:17 p.m.