Hi, I have a new problem. I was trying to use mutate to calculate the percentage of MARRIED respondents (of each year) over years as a new variable. Here is what I have.
may result in what you want. marital == "MARRIED" would be TRUE when the respondant answered MARRIED and the mean would be equivalent to your percentage I guess.