I put together a short list of potential R gotchas: unexpected results which might trip up new R users.
For example, if we have a matrix m,
m[1:2,]
returns a matrix, while
m[1,]
returns a vector, unless one writes
m[1,,drop=FALSE]
Setting aside what the default behavior of functions should be, my point is simply that these are important to be aware of. https://github.com/mikelove/r-gotchas/blob/master/README.md
