I have a data.frame with one column, like so:
>d = data.frame(animal=c(\"horse\",\"dog\",\"cat\"))
then I filter it by excluding all ite
Welcome to R. You've just been bitten by the drop annoyance: you need to explicitly tell R not to "drop to one-dimension":
drop
res = d[!(d$animal %in% c("horse")), , drop = FALSE]