R/verifyIntEntry.R

Defines functions verifyIntEntry

Documented in verifyIntEntry

verifyIntEntry <-
function(x, noValid = "isNoValid") {
  isAnInteger <- strtoi(x)
  if (x == "") {
    xx <- NA
  } else if (is.na(isAnInteger) == FALSE) {
    xx <- isAnInteger
  } else {
    xx = noValid
  }
  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.