R/trynumeric.R

trynumeric <- function(x){
  
  if(all(is.na(suppressWarnings(as.numeric(x)))))
    x
  else
    as.numeric(x)
  
}

Try the Maeswrap package in your browser

Any scripts or data that you put into this service are public.

Maeswrap documentation built on May 2, 2019, 7:58 a.m.