cat.cap: cat.cap

Description Usage Arguments Value

Description

Takes a vector of categorical values and collapses the vector into the first 'lim' unique values (by volume), and the rest are collapsed to an 'other' category.

Usage

1
cat.cap(vector, lim = 50, ret = "other")

Arguments

vector

- The input vector

lim

- A numeric limit on the number

ret

- The category that all other values are collapsed into. Defaults to 'other'.

Value

Returns the vector, where all values not in the x top values are replaced with the value for ret.


christiantillich/AnaliTools documentation built on May 13, 2019, 6:59 p.m.