When numbers should be integers but aren't because of floating point arithmetic issues.
Usage
asInteger(x)
Arguments
x
object to be coerced.
Value
An integer vector.
Details
Standard coercion to integer using as.integer truncates floats.
That behaviour can produce unexpected results when the number is used for subsetting or in a comparaison.