Description Usage Arguments Value Examples
Function to convert vector to class numeric
1 | factor2num(x)
|
x |
An input vector to be converted to class numeric |
output Numeric vector with non-numeric values replaced with NA
1 2 3 | test=factor(c("1","4","ABC","5"))
print(as.numeric(test))
print(factor2num(test))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.