I would like to delete a few rows that have a specific character variable. I can do it but it is not efficient. The below code works but I would like a more efficient way.
Stuff2<-Stuff1[!Stuff1$State.Code=="PR",]
Stuff2<-Stuff2[!Stuff2$State.Code=="HI",]
Stuff2<-Stuff2[!Stuff2$State.Code=="AK",]
How do I create one line of code that removes all observations with PR, HI and AK? I see many examples of numeric values but none for character.