Hi Community,
I have trouble finding a solution for the below problem.
ID | E1 | E2 | E3 | E4 | E5 | Int_start | Int_end |
1 | 0 | 1 | 1 | . | 1 | 2 | 5 |
2 | 0 | 0 | 1 | 1 | 1 | 3 | 4 |
3 | 1 | 1 | 1 | 0 | 0 | 2 | 5 |
4 | 1 | 1 | 1 | 1 | 0 | 1 | 5 |
5 | 1 | 0 | 0 | 0 | 1 | 3 | 5 |
The above dataset has e1 to e5 array and Intervel_start and Intervel_end. The problem I have is to check the array of the Int_start and Int_end and capture the 0 or . in between the series of 1's .
ID | E1 | E2 | E3 | E4 | E5 | Int_start | Int_end | Disenr |
1 | 0 | 1 | 1 | . | 1 | 2 | 5 | e4 |
2 | 0 | 0 | 1 | 1 | 1 | 3 | 4 | . |
3 | 1 | 1 | 1 | 0 | 0 | 2 | 5 | e4 |
4 | 1 | 1 | 1 | 1 | 0 | 1 | 5 | e5 |
5 | 1 | 0 | 0 | 0 | 1 | 3 | 5 | e3 |
The logic of the Disenr variable is that if the array of Int_start and Int_end contains any value other than 1 then I would like to have that variable name in the disenr variable.
Can you help?
Thank you for your time.
Best,
SC.