I have a 9 variables discussing 'who the ID lives with'. There are over 3000 ID variables, the first four columns are 'mother, step-mother, father and step-father',
dummyid yafam01 yafam02 yafam03 yafam04
<dbl> <dbl> <dbl> <dbl> <dbl>
1 100001 1 2 1 2
2 100004 1 2 2 2
3 100007 1 2 2 1
4 100010 1 2 1 2
5 100016 1 2 1 2
6 100019 1 2 1 2
1 means ticked and 2 meaning not ticked
I need to create a new variable that establishes who they live with. Across the dataset the 1s and 2s mean 'ticked' and 'not ticked' (in theory yes/no) So I need one new variable that assigns if they live with 'mother, father, both, step mother, step father, or both step mother and father'