LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (September 2008, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 15 Sep 2008 18:17:53 -0400
Reply-To:     "P. Cristian Gugiu" <crisgugiu@YAHOO.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "P. Cristian Gugiu" <crisgugiu@YAHOO.COM>
Subject:      Count number of unique values in a column vector in IML

Hi all. I have a variable that represents the group an individual belogs to. I would like to calculate the number of group levels by counting the number of unique values for a variable in IML. For example,

Variable X 0 0 0 1 1 2 2 2

So, variable X has 3 group levels (0, 1, 2). Anyone know how to define a variable that is equal to the number of unique values in X?

thanks, Cristian


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