Date: Fri, 3 Nov 2006 15:55:11 -0500
Reply-To: "data _null_;" <datanull@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "data _null_;" <datanull@GMAIL.COM>
Subject: Re: OT: Chance to Make SAS-L History: Did You Know That...
In-Reply-To: <A4F0DBF1F84D4F46A0E6D56405D3511989E6FC@HHAEXMB03.rf01.itservices.ca.gov>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
As much as I would like to think this is my original idea it is not.
I'm sure I learned it on SAS-L probably from "Ian Whitlock
<iw1junk@comcast.net>"
On 11/3/06, Choate, Paul@DDS <pchoate@dds.ca.gov> wrote:
> My Texan friend Toby just made me think of this little "flatten" jewel
> ... posted earlier this year by Data _Null_ - it keeps the last
> non-missing value in each column by the sort group:
>
> data notflat;
> input id sat_math sat_verbal act_comp;
> cards;
> 8188 560 . .
> 8188 . 540 .
> 8188 . . 12
> 8189 660 . .
> 8189 . 740 13
> 8189 . . .
> ;
>
> data flat;
> update notflat(obs=0) notflat;
> by id;
> run;
>
> result:
> 8188 560 540 12
> 8189 660 740 13
>
> Paul Choate
> DDS Data Extraction
> (916) 654-2160
>
|