R/verifyCharEntry.R

Defines functions verifyCharEntry

Documented in verifyCharEntry

verifyCharEntry <-
function(x, noValid = "isNoValid") {
  xx <- x
  isNumber <- try(eval(parse(text = paste0("is.numeric(", x, ")"))), 
                  silent = TRUE)
  if (class(isNumber) == "logical" & isNumber == TRUE) {
    xx <- noValid
  } else if (x == "") {
    xx = NA
  }
  xx
}

Try the KarsTS package in your browser

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

KarsTS documentation built on Jan. 16, 2021, 5:07 p.m.