LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (July 2010, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 16 Jul 2010 18:09:29 -0400
Reply-To:     Randy <randistan69@HOTMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Randy <randistan69@HOTMAIL.COM>
Subject:      Flag Differences

My Data set is as folloows:

ID VarA 1 25 1 36 1 36 1 47 1 68 2 78 2 64 2 64

The data set I want is

ID VarA Flag_DIFF 1 25 0 1 36 0 1 36 1 1 47 0 1 68 0 2 78 0 2 64 0 2 64 1

Once again, there is a long solution. I can create a variable, lag_VarA, and then construct the Flag_DIFF Variable. Since my data set is huge, is there a more efficient solution? I do not understand the IFN function well enough. Where can I read up on it? Randy


Back to: Top of message | Previous page | Main SAS-L page