coerce_to_numeric | R Documentation |
Tries to convert vector to numeric if possible (if no warnings or errors). Otherwise, leaves it as is.
coerce_to_numeric(x)
x |
A vector to be converted. |
Numeric vector (if possible)
coerce_to_numeric(c("1", "2"))
coerce_to_numeric(c("1", "2", "A"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.