is.wholenumber | R Documentation |
Check what elements of a vector are (close to) whole numbers by
abs(x - round(x)) < tol
.
is.wholenumber(x, tol = .Machine$double.eps^0.5)
x |
Numeric vector |
tol |
Numeric vector of length 1 specifying the tolerance.
Default is |
is.wholenumber(1L:5L)
is.wholenumber(1:5)
is.wholenumber(1:5 + .Machine$double.eps^0.5 / 2)
is.wholenumber(1:5 + .Machine$double.eps^0.5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.