toNum | R Documentation |
This function checks if your vector is not a character and if it is, then converts it to a numeric.
toNum(x)
x |
A character, factor, or numeric vector. |
toNum
Returns a numeric vector.
# vector of factors
fact <- factor(c("1", "2", "3", "4"))
# convert to numeric
num <- toNum(x = fact)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.