Date: Mon, 23 Feb 2009 05:54:26 -0500
Reply-To: Annie Lee <hummingbird10111@HOTMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Annie Lee <hummingbird10111@HOTMAIL.COM>
Subject: creating a duplicate list
What is the best way to create a following duplicate id list.
Thank you!
data:
id var1 var2 qtr
01 aa ab 1
02 aa ac 1
02 ac ac 2
03 ab ah 1
03 ay aj 2
03 at at 2
03 au aj 3
03 aw ah 4
04 aj aw 3
results:
id occurance qtrpicked
01 1 1
02 2 1 2
03 5 1 2 3 4
04 1 3
|