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 (August 2006, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Fri, 18 Aug 2006 07:36:38 -0700
Reply-To:   Eric Hoogenboom <erichoogenboom@YAHOO.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Eric Hoogenboom <erichoogenboom@YAHOO.COM>
Organization:   http://groups.google.com
Subject:   Re: Individual Freq of multiple columns
Comments:   To: sas-l@uga.edu
In-Reply-To:   <1155910711.853536.108280@i3g2000cwc.googlegroups.com>
Content-Type:   text/plain; charset="iso-8859-1"

I am not sure if I understand correctly. Especially the 200 confuses me. But let me guess.

Apparently your columns together form a sort of multiple variable. This is a construct that SPSS knows, but SAS does not. You have to transform the dataset to a column/value form. It is easy in SAS. Probably you can adapt the example code below.

data one; input c1-c5; datalines; 1 2 1 1 2 2 1 2 2 2 3 1 3 2 3 run;

data two (keep=val col); set one; array cols c1-c5; do i=1 to dim(cols); col = vname(cols(i)); val = cols(i); output; end; run;

proc freq data=two; tables val * col / nocum nocol norow nopercent missing; run;

Hth, Eric

jrdwthomas@hotmail.com wrote: > Hi, > > This is probably quite an easy task but i'm not personally able to find > a solution! > > Basically i have a sas dataset that has 100 columns and multiple rows > of data.For each column i would like to now the frequency of its > observations. This should give me a table that has columns with their > frequecies basically 200 columns. > > Does this make sense? Any help would be much appreciated. > > Thanks


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