Description Usage Arguments Author(s) Examples
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.
1 | hashFactor(x = character(), levels, codes)
|
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 |
Jeffrey D. Allen Jeffrey.Allen@UTSouthwestern.edu
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.