get_freqs {cat2cat}R Documentation

Getting frequencies for a vector with an optional multiplier argument

Description

getting frequencies for a vector with an optional multiplier argument

Usage

get_freqs(x, multiplier = NULL)

Arguments

x

vector

multiplier

vector how many times to repeat certain value

Value

data.frame with two columns 'input' 'Freq'

Examples

data(occup)

head(get_freqs(occup$code[occup$year == "2008"]))

head(get_freqs(occup$code[occup$year == "2010"]))

head(get_freqs(occup$code[occup$year == "2008"], occup$multiplier[occup$year == "2008"]))

head(get_freqs(occup$code[occup$year == "2010"], occup$multiplier[occup$year == "2010"]))

[Package cat2cat version 0.2.1 Index]