Description Usage Arguments Details Value See Also
This function validates whether the input values are whole integers or not.
It does this by rounding the input values to their nearest whole integer and
then evaluating the difference. If the difference is very, very small
(the default is .Machine$double.eps^0.5
), the numbers will be
accepted as whole.
1 | is.wholenumber(x, tol = .Machine$double.eps^0.5)
|
x |
A vector of numeric values to be tested. |
tol |
The maximum allowable difference between an input number and the nearest whole number. |
All that nonsense is required to avoid floating point comparison errors.
Returns a TRUE if all of the values are integers, FALSE if one or
more are not. Drawn directly from the examples in the
is.integer
documentation.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.