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 (January 2005, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 26 Jan 2005 02:02:54 -0500
Reply-To:     Ya Huang <ya.huang@AMYLIN.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Ya Huang <ya.huang@AMYLIN.COM>
Subject:      Re: How to classified a series of observation ?

Here is a revised shorter version:

data xx; set xx; length allt $9; allt=compress(t1||t2||t3||t4||t5||t6||t7||t8||t9); do i=2 to 9; if substr(allt,i-1,1)=substr(allt,i,1) then substr(allt,i-1,1)=' '; end; allt=compress(allt); if allt='1' then cat=1; else if allt='2' then cat=2; else if allt='3' then cat=3; else if allt='132' then cat=7; else if allt='131' then cat=9; else if allt='213' then cat=8; else if allt='13' then cat=4; else if allt='21' then cat=5; else if allt='23' then cat=6; drop allt; run;

proc print noobs; run;


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