Is it okay to use floating-point numbers as indices or when creating factors in R?
I don\'t mean numbers with decimal parts; that would clearly be odd, but instead n
Constructs such as 1:3 are really integers:
1:3
> class(1:3) [1] "integer"
Using a float as an index entails apparently some truncation:
> foo <- 1:3 > foo [1] 1 2 3 > foo[1.0] [1] 1 > foo[1.5] [1] 1