☆─────────────────────────────────────☆
sociopeople (sociopeople) 于 (Tue Mar 20 21:17:27 2007) 提到:
Below is the original dataset:
Id day
01 0
01 0
01 0
01 1
01 1
01 0
01 0
01 1
01 1
01 1
02 1
02 1
02 0
03 0
03 0
03 1
I need to create two variables counting the number of 0 and 1 respectively
the final dataset should look like: var1 is a variable counting the number
of 0 and var2 is a variable counting the number of 1
id var1 var2
01 3 2
01 2 3
02 1 2
03 3