i.stack.imgur.com/hwans.png
How can I recode the V162034a variable so that I only have the categories for Hillary Clinton and Donald Trump - and set the others as missing values?
i.stack.imgur.com/hwans.png
How can I recode the V162034a variable so that I only have the categories for Hillary Clinton and Donald Trump - and set the others as missing values?
V162034a[ !(V162034a %in% c("2. Hilary Clinton" ,"1. Donald Trump"))] <- NA
This depends on how the data are structured in R, i.e. if it is a column in a data.frame or not.