Date: Thu, 26 May 2005 08:15:24 -0700
Reply-To: "Choate, Paul@DDS" <pchoate@DDS.CA.GOV>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Choate, Paul@DDS" <pchoate@DDS.CA.GOV>
Subject: Re: Frequencies of all the attributes
VB - You might want to write them to a single variable.
Data var(keep=attr);
Input v1 v2 v3 ;
array vars v1--v3;
do over vars;
attr=vars;
output;
end;
datalines;
1 2 3
4 5 6
7 8 9
2 3 1
5 6 2
8 9 3
;
Proc freq;
tables attr;
run;
hth
Paul Choate
DDS Data Extraction
(916) 654-2160
-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of vinoth
babu
Sent: Thursday, May 26, 2005 7:56 AM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Frequencies of all the attributes
Hi,
I need to find the frequencies of all attributes
irrespective of the variables.
u can take a sample dataset below.
Data var;
Input v1 v2 v3 ;
datalines;
1 2 3
4 5 6
7 8 9
2 3 1
5 6 2
8 9 3
;
Run;
result should be
attr Freq
1 2
2 3
3 3
4 1
5 2
6 2
7 1
8 2
9 2
any ideas ?
VB
________________________________________________________________________
Yahoo! India Matrimony: Find your life partner online
Go to: http://yahoo.shaadi.com/india-matrimony