Hello,
I have the following dataset:
individual group
1111 0
1111 0
1111 1
1111 1
2222 1
2222 1
3213 0
3213 0
3213 0
3213 1
3213 1
3213 1
3213 1
3213 1
3444 0
3444 0
3444 0
In case the individual is both in group 0 and 1 (e.g. 1111, 3213) I would like to delete all observations related to that individual from group 0. For example, I would like to end up with:
individual group
1111 1
1111 1
2222 1
2222 1
3213 1
3213 1
3213 1
3213 1
3213 1
3444 0
3444 0
3444 0
Does anyone know a quick way to do this? Thank you.
I have the following dataset:
individual group
1111 0
1111 0
1111 1
1111 1
2222 1
2222 1
3213 0
3213 0
3213 0
3213 1
3213 1
3213 1
3213 1
3213 1
3444 0
3444 0
3444 0
In case the individual is both in group 0 and 1 (e.g. 1111, 3213) I would like to delete all observations related to that individual from group 0. For example, I would like to end up with:
individual group
1111 1
1111 1
2222 1
2222 1
3213 1
3213 1
3213 1
3213 1
3213 1
3444 0
3444 0
3444 0
Does anyone know a quick way to do this? Thank you.
Comment