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 (December 2001, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 11 Dec 2001 14:39:37 -0500
Reply-To:     "Kaskey, Larry" <LKaskey@SEISINT.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Kaskey, Larry" <LKaskey@SEISINT.COM>
Subject:      Re: proc FREQ help
Content-Type: text/plain; charset="iso-8859-1"

If all you need is a count of unique values...create a table in Proc SQL using the distinct statement on ID and check out the log for how many records were written.

proc sql; create table work.bigtable_ids select distinct id from library.bigtable;

-----Original Message----- From: Fehd, Ronald J. [mailto:rjf2@CDC.GOV] Sent: Tuesday, December 11, 2001 2:30 PM To: SAS-L@LISTSERV.UGA.EDU Subject: Re: proc FREQ help

> From: jsahuqui@WORLDONLINE.ES [mailto:jsahuqui@WORLDONLINE.ES] > I use SAS 8.2. I have a big Table (about 1000 records). One > field in the > table is the ID for the patient. Because of the design of the > study each > patient number (i.e. 345678) can be repeated 2- 5 yimes with the same > variables. This correpsonds to the same patients evaluated at > differnet > days in independent tests. I would like to know how can I > count how many > unique IDs I have (Proc FREQ ?). Any help would be appreciated.

proc FREQ data = LIBRARY.BigTable; tables Id / noprint out = IDLIST (keep = Id);

%LET NMBR_IDS = 0; %NOBS(NMBR_IDS,data = WORK.IDLIST);

send e-mail with subject: request NOBS

Ron Fehd the macro maven CDC Atlanta GA USA RJF2@cdc.gov OpSys: Win_Pro Ver: 8.2 ---> cheerful provider of UNTESTED SAS code from the KludgeWrx !*! <---


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