I have data from a survey. I have data from several Likert-type questions. For example: "To what extent did the following factors contribute to your decision to enroll in a PhD program?" with 4 categories: 1: Not at all; 2: To a small extent; 3: To some extent; 4: To a great extent)
I exported the data and it currently looks like this:
id Q1_Item1 Q1_Item2 Q1_Item3 Q1_Item4
1 4 4 4 2
2 1 2 3 4
3 3 4 4 4
4 3 3 3 3
5 2 1 1 1
I want to tabulate the data so it looks like this
Not at all To a small extent To some extent To a great extent
Item1 1 1 2 1
Item2 1 1 1 2
Item3 1 0 2 2
Item4 1 1 1 2
where the number now represent the counts of responses under each category. How can I do this in R?