I have a dataframe containing responses to a multicode question by month, where:
- 1 = Yes;
- 0 = No.
The output I'm after is a contingency table (with %s) detailing the proportion of 1 ('Yes') responses by month for each of the multicode columns:
Example data:
| Month | Multicode_1| .... | Multicode_n|
| --- | .......... | .... | .......... |
| Jan22 | 1 | .... | .......... |
| Feb22 | 0 | .... | .......... |
Feels like this almost gets to it, but not quite:
ex8 <- NPSSurvey_df %>%
group_by(Month) %>% filter(Pack == "Sports", CustomerType == "New") %>%
summarise(across(Vid_Freeze:Mistake))
head(ex8)