powered by
Tries to convert vector to numeric if possible (if no warnings or errors). Otherwise, leaves it as is.
to_numeric(x)
A vector to be converted.
Numeric vector (if possible)
# NOT RUN { to_numeric(c("1", "2")) to_numeric(c("1", "2", "A")) # }
Run the code above in your browser using DataLab