View source: R/is_whole_number.R
| is_whole_number | R Documentation |
Very fast check that numeric vector consists only of whole numbers
is_whole_number(x, tol = sqrt(.Machine$double.eps), na.rm = TRUE)
x |
|
tol |
|
na.rm |
|
is_whole_number() will return NA when these 3 conditions are met:
na.rm is FALSE
x contains at least 1 NA value
x contains only a mix of whole numbers and/or NA values. If any values
are not whole numbers then we can return FALSE even with the presence of
NA values.
If x is not numeric then is_whole_number() always returns FALSE.
TRUE, FALSE, or NA (see Details)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.