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