Reputation: 13
I'm working on a large weighted national dataset that includes respondent's state as a variable. I wanted to create subsets with multiple states (i.e. AZ, IL, NJ). All of the threads I found show how to subset from multiple columns but is there a way to create subsets from multiple categorical values in the same column? One of my attempts is included below and all attempts result in either an error or subsets with only the Arizona respondents.
AZILNJ <- subset(FFE.PRAMS, STATE=='AZ', 'IL', 'NJ')
I could just delete unwanted state responses in Excel, it'd be nice if there was a way to do this in R though.
Upvotes: 1
Views: 414