R/is.number.R

Defines functions is.number

is.number <- function(x) {
  warn <- getOption("warn"); options(warn = -1)

  y <- try(as.numeric(x))

  options(warn = warn)

  if (any(is.na(y))) {
    FALSE
  }
  else {
    TRUE
  }
} ## is.number

Try the rebmix package in your browser

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

rebmix documentation built on July 26, 2023, 5:32 p.m.