Dear all,
I have a data set in which a variable need to be combined to create a row total (score). I want to generate a variable that count how manay 1s, 2s and missings are there v1 - v6. Below is an example with last three columns need to be generated.
is there any way to do so.
Many thanks.
I have a data set in which a variable need to be combined to create a row total (score). I want to generate a variable that count how manay 1s, 2s and missings are there v1 - v6. Below is an example with last three columns need to be generated.
v1 | v2 | v3 | v4 | v5 | v6 | total 1 | total 2 | total mis |
1 | 2 | 1 | . | 1 | . | 3 | 1 | 2 |
Many thanks.
Comment