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 (June 2006, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Mon, 12 Jun 2006 21:33:44 +0000
Reply-To:   toby dunn <tobydunn@HOTMAIL.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   toby dunn <tobydunn@HOTMAIL.COM>
Subject:   Re: Counting Issues
Comments:   To: fkhurshed@hotmail.com
In-Reply-To:   <1150147119.857834.5360@i40g2000cwc.googlegroups.com>
Content-Type:   text/plain; format=flowed

Proc sort data = Have ; by Year Station ;

If First.Station then StationCnt + 1 ;

ObsCnt + Observation ;

If last.Year then do ; output ; StationCnt = 0 ; ObsCnt = 0 ; end ; run ;

This may need to be tweeked as the example data nd what you say is the functional dependencies doesnt match up.

Toby Dunn

From: Reeza <fkhurshed@HOTMAIL.COM> Reply-To: Reeza <fkhurshed@HOTMAIL.COM> To: SAS-L@LISTSERV.UGA.EDU Subject: Counting Issues Date: Mon, 12 Jun 2006 14:18:39 -0700

Hi,

I'm having some problems counting my data.

It's of the format:

Station Year Month Day observation A 1901 6 1 2.4 B 1901 6 1 3.5 C 1901 8 2 2.5 ..... A 1910 6 1 2.6 B 1910 6 1 2.8 C 1910 8 1 9.4

Basically I'm looking to count by year, the number of unique stations and the total number of observations. The key=station year month day is unique. I can get each count seperately by using proc means and combining, but is it possible to get it in one step?

Thanks, Reeza


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