I have a variable x which can take five values (0,1,2,3,4). I want to divide the variable into two variables. Variable 1 is supposed to contain the value 0 and variable two is supposed to contain the values 1,2,3 and 4. I'm sure this is easy but I can't find out what i need to do.
what my data looks like:
|variable x|
|-----------|
|0|
|1|
|0|
|4|
|3|
|0|
|0|
|2|
so i get the table:
| 0 | 1 | 2 | 3 | 4 |
|---|---|---|---|---|
| 125 | 34 | 14 | 15 | 15 |
But I want my data to look like this
| variable 1 |
|---|
| 125 |
| variable 2 |
|---|
| 78 |
So variable 1 is supposed to contain how often 0 is in my data
and variable 2 is supposed to contain the sum of how often 1,2,3 and 4 are in my data