What is the best way to remove multiple items from a data framework? In my case, I have all days of the month in the data frame and you want to delete several days. Something like below works fine for one day.
m[m$date!="01/31/11",]
However, if I try something like
m[m$date!=c("01/31/11","01/30/11"),]
I get a warning message
Warning message: In `!=.default`(m$date, c("01/31/11", "01/30/11")) : longer object length is not a multiple of shorter object length Calls: [ ... [.data.frame -> Ops.dates -> NextMethod -> Ops.times -> NextMethod
It seems to work two days, but if I add 01/29/11 to the vector, it shows all the days, but 01/31/11.
r
matt_k Sep 21 2018-11-11T00: 00Z
source share