powered by
This function checks if a numeric value is and integer-like scalar, meaning it is numeric and its length is 1.
is_integerlike(x)
TRUE if x is integer-like, otherwise FALSE.
TRUE
x
FALSE
Numeric value to check.
is_proportion, is_count, validate_proportion, validate_count
is_proportion
is_count
validate_proportion
validate_count
is_integerlike(3) # TRUE is_integerlike(3.5) # FALSE is_integerlike("3") # FALSE is_integerlike(c(1, 2)) # FALSE
Run the code above in your browser using DataLab