- Posts: 348
- Thank you received: 41
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Ranking question, numeric summary
- Jmantysalo
- Topic Author
- Offline
- Platinum Member
Less
More
7 months 1 week ago #250810
by Jmantysalo
Ranking question, numeric summary was created by Jmantysalo
Suppose that I ask what fruits people prefer and use ranking question. Some answer is banana, apple, orange, another is orange, banana, plum and so on. For results I want something like 5 points for bananas: 3 points from first place, 2 points from second place. Is it possible to compute directly inside LimeSurvey?
Please Log in to join the conversation.
- Fatima8
- Offline
- New Member
Less
More
- Posts: 2
- Thank you received: 0
7 months 1 week ago #250812
by Fatima8
Replied by Fatima8 on topic Ranking question, numeric summary
I would love to know the way too. I have spend 8 hours trying to figure lime survey and a way to rank the answers.
Please Log in to join the conversation.
- Jmantysalo
- Topic Author
- Offline
- Platinum Member
Less
More
- Posts: 348
- Thank you received: 41
7 months 1 week ago #250813
by Jmantysalo
Replied by Jmantysalo on topic Ranking question, numeric summary
If you make a CSV file with tabs as delimiter from the question, this is quite easy in Linux command line for a single quiestion:
rev results.csv | tr '\t' '\n' | sort -u | while read x; do echo "$x" | rev | tr '\n' '|'; rev results.csv | egrep -o ".+$x" | tr -c -d '\t' | wc -c; done | sort -k 2 -t '|' -n -r | tr '|' '\t'
But a normal user will get a headache by just looking that. And it is still clumsy if you have several questions.
rev results.csv | tr '\t' '\n' | sort -u | while read x; do echo "$x" | rev | tr '\n' '|'; rev results.csv | egrep -o ".+$x" | tr -c -d '\t' | wc -c; done | sort -k 2 -t '|' -n -r | tr '|' '\t'
But a normal user will get a headache by just looking that. And it is still clumsy if you have several questions.
Please Log in to join the conversation.
- Fatima8
- Offline
- New Member
Less
More
- Posts: 2
- Thank you received: 0
7 months 1 week ago #250814
by Fatima8
Replied by Fatima8 on topic Ranking question, numeric summary
I have many questions, since I am creating a Theory of planned behaviour survey. and zero knowledge on this program. I will be waiting for an easier solution
Please Log in to join the conversation.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13035
- Thank you received: 4009
7 months 1 week ago - 7 months 1 week ago #250817
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic Ranking question, numeric summary
I agree, the way LimeSurvey stores results of ranking questions is not what most users need.
Of course, it is a really short makro in Excel to restructure this (or with other solutions, as you showed).
Inside LimeSurvey it is possible with one equation to assign the values to a question of type "multiple numeric" (Q2), like
{Q2_1=if(R1_1==1,5,if(R1_2==1,3,0))}
{Q2_2=if(R1_1==2,5,if(R1_2==2,3,0))}
{Q2_3=if(R1_1=,5,if(R1_2=,3,0))}
{Q2_4=if(R1_1==4,5,if(R1_2==4,3,0))}
...
But in my opinion you should do this in your analyzing tool
Joffm
Of course, it is a really short makro in Excel to restructure this (or with other solutions, as you showed).
Inside LimeSurvey it is possible with one equation to assign the values to a question of type "multiple numeric" (Q2), like
{Q2_1=if(R1_1==1,5,if(R1_2==1,3,0))}
{Q2_2=if(R1_1==2,5,if(R1_2==2,3,0))}
{Q2_3=if(R1_1=,5,if(R1_2=,3,0))}
{Q2_4=if(R1_1==4,5,if(R1_2==4,3,0))}
...
But in my opinion you should do this in your analyzing tool
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 7 months 1 week ago by Joffm.
The following user(s) said Thank You: Jmantysalo
Please Log in to join the conversation.