Inspired by recent @johnmyleswhite tweets on indexing (though they focus more on NA stuff)
My standard advice to R novices is "don't worry about numeric vs integer too much, for now", but I just created an indexing example that scares me.
I did not realize it was sooo easy to create this gotcha when indexing with numeric (which I know is not a great idea).
x <- 4:1 + 0.1
str(x <- x - 0.1)## num [1:4] 4 3 2 1
(1:4)[4:1]## [1] 4 3 2 1
(1:4)[x]## [1] 3 3 2 1