Description Usage Arguments Value
This function can be used to distinguish e.g. dummy variables (only 0 and 1) from other numeric columns. Applying to non numeric columns will fail. It also allows for negative whole numbers and decimals with no rest e.g. 3.0, as this can be a matter of print formatting rather of type
1 | is.wholenumber(x, tolerance = .Machine$double.eps^0.5)
|
x |
the vector to be tested, use 'sapply(x, is.wholenumber)' for a data frame |
tolerance |
numerical specifying the tolerance for rounding a value. defaults to '.Machine$double.eps^0.5' with '.Machine$double.eps' being the smallest positive floating-point number x such that 1 + x != 1 |
A logical vector returning TRUE for column(s) that are completely integers
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.