2
我的數據是這樣的:SPSS - 變量的情況下
Person Region Grapes Apples Bananas
Bob IV 4 2 1
Jane II 0 1 2
我需要重組(瓦爾案件?)返回一個記錄水果的人有各自的個數,如:
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
下面的代碼將返回這一點,這是更近了一步,但也不能令人信服:
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.
有什麼建議嗎?