I really just want to do something like
x <- as.integer(c(1,2,3))
But because c(1,2,3) is stored as a floating point vector I'm worried that I'll have problems with truncation, such as
> as.integer(1.99999999999)
[1] 1
How do I know I'm safe?