is.wholenumber | R Documentation |
Function to check if a number is whole, accounting for a rounding error.
is.wholenumber(x, tol = .Machine$double.eps^0.5)
x |
The number to be checked. |
tol |
Tolerance level. |
The default method for 'is.wholenumber' returns 'TRUE' if the number provided is a whole number.
David Hastie, Department of Epidemiology and Biostatistics, Imperial College London, UK
Silvia Liverani, Department of Epidemiology and Biostatistics, Imperial College London and MRC Biostatistics Unit, Cambridge, UK
Maintainer: Silvia Liverani <liveranis@gmail.com>
Silvia Liverani, David I. Hastie, Lamiae Azizi, Michail Papathomas, Sylvia Richardson (2015). PReMiuM: An R Package for Profile Regression Mixture Models Using Dirichlet Processes. Journal of Statistical Software, 64(7), 1-30. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.18637/jss.v064.i07")}.
is.wholenumber(4) # TRUE
is.wholenumber(3.4) # FALSE
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.