I'm new to R and trying to do some exploratory analysis. I have a dataset with multiple columns, 3 of them look like this
Q1 Q2 Q3
1 6 2
2 6 7
2 6 6
6 6 6
7 1 1
6 6 1
where Qs are yes/no questions and 1,2,6,7 are encoded for "Yes", "No", "Don't know", and "Valid skip"
I want to create small multiples plot from these 3 columns that shows the frequency of each type of answer grouped by question. The approach I'm trying to do is to transform these columns to a new data frame with 3 variables: Question (that takes 3 values Q1, Q2, Q3), Answer (takes 4 values 1, 2, 6, 7), and Frequency, then I can create small multiples.
Could you show me how to do this transformation? And if you know other ways to create the chart, please share as I would love to know different ways to do it.
Thanks a lot!