powered by
Returns TRUE / FALSE whether it is exactly 1 number (numeric or integer vector of length 1, non-missing)
TRUE
FALSE
isNum(num)
variable to be tested
TRUE / FALSE
isInt, isLogical, isString
isInt
isLogical
isString
# NOT RUN { isNum(2) isNum(2L) isNum(-2) isNum(-2L) isNum(2.1) isNum(-2.1) isNum(1:5) isNum(NA_real_) isNum(numeric(0)) # }
Run the code above in your browser using DataLab