Hi all, I am looking at multiple urine samples from multiple pregnancies and only want to keep those from the last pregnancy (this could be multiple samples from the last pregnancy). Currently using this code but it's not working, it seems to be only keeping the last observation from each pregnancy. Any help would be greatly appreciated! data preg1; set preg; by ID2 pregcycle; if LAST.pregcycle then output; run;
... View more