I have a big data and I want subjects with test result <50 and to include subjects if the test result <150 one time only during their testing period. If the test result is <150 2x or more then the subject will not be need. For example, ID – 4 has 1 st test <50 but 2 test results <150 so the subject will not be need. How can I get those that have test<50 or test<150 one time only?
ID
test
1
50
1
45
1
78
2
34
2
26
3
67
4
22
4
120
4
69
This is how the output would look like
ID
test
1
50
1
45
1
78
2
34
2
26
3
67
... View more