I have data like this:
Person Region Grapes Apples Bananas
Bob IV 4 2 1
Jane II 0 1 2
I need to restructure (vars to cases?) to return one record for each number of fruits the person had, like this:
Person Region Fruit
Bob IV Grapes
Bob IV Grapes
Bob IV Grapes
Bob IV Grapes
Bob IV Apples
Bob IV Apples
Bob IV Bananas
Jane II Apples
Jane II Bananas
Jane II Bananas
The code below will return this, which is a step closer but not quite there:
Person Region Fruit Count
Bob IV Grapes 4
Bob IV Apples 2
Bob IV Bananas 1
Jane II Apples 1
Jane II Bananas 2
VARSTOCASES
/MAKE Count FROM Grapes Apples Bananas
/INDEX=Fruit(Count)
/KEEP=Person Region
/NULL=KEEP.
Any suggestions?