hashFactor: Create a hashFactor

Description Usage Arguments Author(s) Examples

Description

Creates a hashFactor object, which operates in much the same way as a factor, but doesn't require a continuous sequence of integers for the levels.

Usage

1

Arguments

x

The values to be encoded into a factor

levels

The labels associated with each level of the factor

codes

the integer codes associated with each level of the factor

Author(s)

Jeffrey D. Allen Jeffrey.Allen@UTSouthwestern.edu

Examples

1
2
3
fac <- hashFactor(sample(LETTERS[1:5], 10, replace=TRUE),
	levels=LETTERS[1:5], codes=c(1,5,8,2,6))
d <- data.frame(i=11:20, f=fac)

QBRC/RODProt documentation built on May 8, 2019, 3:11 p.m.