Date: Thu, 21 Feb 2008 09:51:55 -0500
Reply-To: "Howard Schreier <hs AT dc-sug DOT org>"
<schreier.junk.mail@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Howard Schreier <hs AT dc-sug DOT org>"
<schreier.junk.mail@GMAIL.COM>
Subject: Re: count across all rows and colums
On Thu, 21 Feb 2008 06:43:48 -0800, =?ISO-8859-1?Q?A_Ala-M=F6nk=E4re?=
<a@MAILINATOR.COM> wrote:
>Muthia Kachirayan wrote:
>> Here is an array approach which can be adapted to handle 16 columns to deal
>> with 1 million rows as desired.
>
>muthia, what if the original dataset would look like this (only 1
>variable and $4. instead of $1.)
>
>the do i = 1 to 3 would become do i = 1 to 1 but what else would need
>changing ?
>
>data given;
> input a $4. ;
> cards;
> aaaa
> b
> hhh
> aaaa
>run;
>
>desired result
>
>var=aaaa count=2
>var=b count=1
>var=hhh count=1
No pre-processing needed; run PROC FREQ directly against the given data set.
|