Returns TRUE/FALSE on whether a number is integer or not.
check.integer(N)
N | A number (if a vector is supplied only the first element is checked - without warning) |
---|
https://stackoverflow.com/questions/3476782/how-to-check-if-the-number-is-integer
TRUE/FALSE on whether a number is integer or not.
Surprising as it may be, R doesn't come with a handy function to check if the number is integer. This function does just this.
VitoshKa
check.integer <- installr:::check.integer check.integer(4) # TRUE#> [1] TRUEcheck.integer(3243) #TRUE#> [1] TRUEcheck.integer(3243.34) #FALSE#> [1] FALSEcheck.integer("sdfds") #FALSE#> [1] FALSEcheck.integer(1e4) #TRUE#> [1] TRUEcheck.integer(1e6) #TRUE#> [1] TRUEcheck.integer(1e600) #FALSE - the function is having a hardtime with Inf...#> [1] FALSE