r - remove rows of data based on one of any criteria -
i'm trying create association rules aprori algorithm between different error messages. there several errors not want consider, want remove rows contain these select errors. problem can remove 1 error using code below.
mydata <-data[!(data$message=="errormessageone") ,]
is there "or" operator can integrated in order remove lines containing of 12 or errors want exclude data.
something following.
mydata <-data[!(data$errormessage=="errormessageone or errormessagetwo or errormessagethree") ,]
i know basic question has got me stumped.
you can try:
mydata <-data[!data$errormessage %in% c("errormessageone","errormessagetwo", "errormessagethree"),]
Comments
Post a Comment