I have two columns with dummy variables, each '0' and '1'. And I want to merge these to columns and make a single column. But I want my values in a new column to be matched like:
1) If I05_11 is '1', then match with I05_12 '1'
2) If I05_11 is '1', then match with I05_12 '0'
3) If I05_11 is '0', then match with I05_12 '0'
4) If I05_11 is '0', then match with I05_12 '1'
I05_11 | I05_12 |
0 | 1 |
1 | 1 |
1 | 0 |
0 | 0 |
1 | 0 |
How can I get this result?
Thank you very much beforehand!
0 Response to Matching variables from two columns
Post a Comment