unfactor | R Documentation |
Factors store values as integers and use a 'levels' attribute to map the integers to labels. This function removes the 'factor' class and levels attribute, leaving the vector of integers.
unfactor(f)
f |
a factor |
f <- factor(letters[1:3])
print(f)
print(unfactor(f))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.