I have been using the R which function to remove rows from a data frame. I recently discovered that if the search term is NOT in the data.frame, the result is an e
which
Because of this:
which(LETTERS == '-1') ## integer(0)
and this:
(1:2)[integer(0)] integer(0)
Instead of #4, use this:
LETTERS[LETTERS != "R"]