Hello, i'm trying to create a new column based on a logical order. What i need to do is:
Create a column "d", and their values will be: "1" if the columns "x", "y", or "z" has a number 1, if it isn't the value will be 0
x y z d
1 na 2 1
1 1 2 1
na 2 2 0
1 2 na 1
na 1 1 1
1 2 2 1
2 2 1 1
2 na na 0