Description Usage Arguments Value Examples
View source: R/factor2numeric.R
A simple function for converting factors to numeric values
1 |
x |
A vector of type |
x
converted to a numeric vector
1 2 3 4 5 6 7 8 9 | # Define a factor object
y <- factor(5:7)
y
# incorrectly convert to numeric
as.numeric(y)
# correctly convert
factor2numeric(y)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.