Date: Fri, 24 Jun 2011 08:24:08 -0400
Reply-To: Mike Jacobsen <nordath1@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Mike Jacobsen <nordath1@GMAIL.COM>
Subject: Re: data manipulation help
In addition to Haikuo's response, here is a slightly longer solution:
data test;
input ID DAys_From_Baseline Minus_30;
datalines;
1 26 -6
1 40 10
1 55 25
2 35 5
2 45 15
3 20 -10
3 31 1
3 32 2
;
proc sort data=test;
by ID Minus_30;
run;
data test;
set test;
by ID;
if first.ID then output;
run;
proc print data=test;run;