is_whole_number: Checks if an object is a whole number

Description Usage Arguments Value Ignoring NAs See Also

Description

Checks if an object is equal to its rounded form, minus some tolerance.

Usage

1
2
3
4
5
are_whole_number(x, tol = .Machine$double.eps^0.5)

is_whole_number(x, tol = .Machine$double.eps^0.5, n = NULL, na_rm = FALSE)

is_scalar_whole_number(x, tol = .Machine$double.eps^0.5)

Arguments

x

object to be checked

tol

scalar numeric: tolerance within which a whole number will be declared

n

scalar whole number: expected length of vector

na_rm

scalar logical: whether or not NAs should be considered in the calculation. If na_rm = FALSE, then any NA in the vector being checked will result in an NA output.

Value

scalar logical

Ignoring NAs

NA

See Also

Other predicates: are_non_negative, are_numeric_like, are_positive, are_zero, has_zero_range, is_binary_valued, is_scalar_bare_numeric, is_zero


biodatacore/biodatacoreUtils documentation built on May 28, 2019, 7:11 p.m.