I have the following dataset
seqno rectyp ps04
1 1
1 1
1 89
1 89
2 1 0
2 1 1
2 1
2 90
2 89
3 1
3 1
3 1
3 90
3 90
3 89 1
3 89 5
3 89 6
3 89
I would like to do is look for values ps04==1 and rectype==1 for a certain seqno value. Once found, it will fill out the whole rows of that seqno with value 1. Expected output would be:
seqno rectyp ps04
1 1
1 1
1 89
1 89
2 1 1
2 1 1
2 1 1
2 90 1
2 89 1
3 1
3 1
3 1
3 90
3 90
3 89 1
3 89 5
3 89 6
3 89