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

Popular posts from this blog

python Tkinter Capturing keyboard events save as one single string -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

javascript - Z-index in d3.js -