I've used LimeSurvey to capture ranking information for 8 options across a large class of students. I've exported the results as CSV, and I get something like the following...
Team1 Option7 Option4 Option6 Option1 Option2 Option3 Option5 Option8
Team2 Option4 Option3 Option1 Option2 Option7 Option8 Option6 Option5
...
... where the ranking goes from lowest to highest (e.g. Team1 most preferred Option7). What I'm trying to turn this into is something like...
Option1 Option2 Option3 Option4 Option5 Option6 Option7 Option8
4 5 6 2 7 3 1 8
3 4 2 1 8 7 5 6
...
... in as "R like" a way as possible (e.g. avoiding nested for
loops and the like). My end goal is to generate histograms for each option showing how often they were voted first, second, etc. I have a suspicion that reshape
and it's ilk might help, but having to use the "position" information is tripping me up.
Any assistance gratefully appreciated!