Description Usage Arguments Value Author(s) Examples
Convert factor with numeric labels to numeric
1 2 | ## S3 method for class 'factor'
as.numeric(x)
|
x |
A factor vector. |
A numeric vector.
Caspar J. van Lissa
1 2 3 4 | factor_vector <- factor(c("2", "4", "6", "3", "1"))
numeric_vector <- as.numeric.factor(factor_vector)
factor_vector
numeric_vector
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.