Date: Wed, 10 Aug 2005 11:56:20 -0700
Reply-To: monal kohli <k_monal_99@YAHOO.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: monal kohli <k_monal_99@YAHOO.COM>
Subject: Re: Tracking Total Changes
In-Reply-To: <455E5B258922154FBE497F58237915C606BEF6@XCH-NW-8V2.nw.nos.boeing.com>
Content-Type: text/plain; charset=iso-8859-1
Is this what you are trying to do:
DATA X;
LENGTH ID DAY TEMP 3.;
INPUT ID DAY TEMP ;
DATALINES;
1 1 100
1 2 101
1 3 99
1 4 101
;
RUN;
PROC SORT DATA=X;BY ID;RUN;
DATA X;
SET X;
BY ID;
RETAIN TEMPP;
IF FIRST.ID THEN TEMPP=TEMP;
DIFF=ABS(TEMPP-TEMP);
RUN;
MK
--- "Schwarz, Barry A" <barry.a.schwarz@BOEING.COM>
wrote:
> Your example implies you are only interested in the
> difference between
> starting and ending values. Sort by ID and Day and
> use the first. and
> last. properties to identify the values of interest.
>
> -----Original Message-----
> From: Nate M [mailto:Nate5959@HOTMAIL.COM]
> Sent: Wednesday, August 10, 2005 4:19 AM
> To: SAS-L@LISTSERV.UGA.EDU
> Subject: Tracking Total Changes
>
>
> Hello there. I have been struggling with this, and I
> avail myself to the
> vast knowledge of this message board.
>
> I have a bunch of objects and I want to track the
> temperature changes
> that it has over a bunch of days.
>
> Example, I'll have:
>
> ID-Day-Temp
> 1 - 1 - 100
> 1 - 2 - 101
> 1 - 3 - 99
> 1 - 4 - 101
>
> I'm looking for it to tell me that the temperature
> has increased 1
> degree in total of 4 days. Thanks a bunch!
>
> ~Nate M.
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
|