Description Usage Arguments Value Examples
A categorical vector is an extended factor
with extra attributes
Creating a categorical vector is almost identical to creating a factor.
1 |
x |
|
cats |
optional |
levels |
optional |
labels |
optional |
... |
not used |
categorical vector
1 2 3 4 5 6 7 8 9 10 | gendercats <- data.frame( label = c("male", "female")
, code = c("M","F")
)
gender <- categorical(c("male", "male", "female", "male"), cats=gendercats)
gender
categories(gender)
relabel(gender, "code")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.