combineEqual: Combine Equal

Description Usage Arguments Details Value Examples

Description

Given a contingency table of counts, combine factors with equal counts.

Usage

1
  combineEqual(x, maxChar = 24)

Arguments

x

numeric. Contingency table or matrix of names and counts, see table.

maxChar

numeric. Maximum length of character string. Names exceeding this will be replaced with a letter-code.

Details

Factor names will be pasted together to make new names. A code and definition will be generated if the new name should exceed maxChar.

Value

a list with three elements

x

Named vector of code frequencies. The name corresponds to the code.

codes

Character vector of alpha-code labels.

defs

Character vector of code definitions.

Examples

1
2
combineEqual(table(rep(991:1010, times=rep(1:4, each=5))))
combineEqual(table(rep(991:1010, times=rep(1:4, each=5))), maxChar=10)

harrelfe/rreport documentation built on May 17, 2019, 2:48 p.m.