Hello,
I'm trying to get lists of the frequency distributions for each of two variables (vars C and N in the examples). I'd like the distribution for each variable to range from the min of the two variables to the max of the two variables. I can work out the max value beforehand by ordering the data by variable. Not sure how to calculate the frequency distribution though.
Any notes on the functions of different parts of the commands, would be much appreciated too! Still learning...
Thank you!
Example input file:
Var, Num
C,5
C,0
C,5
C,2
C,0
N,1
N,1
N,0
C,5
C,3
request output file:
Var, Num, Frq
C,0,2
C,1,0
C,2,1
C,3,1
C,4,0
C,5,3
N,0,1
N,1,2
N,2,0
N,3,0
N,4,0
N,5,0
OR,
Num, Frq_C, Frq_N
0,2,1
1,0,2
2,1,0
3,1,0
4,0,0
5,3,0