Date: Fri, 16 Oct 2009 07:06:08 -0700
Reply-To: billyk <saswiz@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: billyk <saswiz@GMAIL.COM>
Organization: http://groups.google.com
Subject: Re: PROC FREQ question or maybe TABULATE?
Content-Type: text/plain; charset=ISO-8859-1
On Oct 16, 8:55 am, peterflomconsult...@mindspring.com (Peter Flom)
wrote:
> Hi all
>
> Is there an easy way to get PROC FREQ to output the table in order of the frequencies?
>
> e.g. I have
>
> proc freq data = poly;
> table pattern2;
> run;
>
> where patern2 is a character variable. I'd like the most common pattern2 to be first, then the next most common, etc.
>
> If it isn't simple, then I can do it by exporting to Excel and sorting there.
>
> thanks!
>
> Peter
>
> Peter L. Flom, PhD
> Statistical Consultant
> Website: www DOT peterflomconsulting DOT com
> Writing;http://www.associatedcontent.com/user/582880/peter_flom.html
> Twitter: @peterflom
Use the ORDER=FREQ option, e.g.
proc freq data = poly ORDER=FREQ;
table pattern2;
run;
|