Date: Thu, 13 Jan 2000 11:04:21 -0500
Reply-To: Howard Schreier <Howard_Schreier@ITA.DOC.GOV>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Howard Schreier <Howard_Schreier@ITA.DOC.GOV>
Subject: Re: Tabulate question
Content-Type: text/plain; charset=US-ASCII
You can do it by normalizing the data set. PROC TRANSPOSE is my
preferred method. In this case it's necessary to generate a BY variable
so that each observation is transposed individually. I would do this in
a view, just for efficiency.
input var1 var2 var3;
1 2 3
4 . 5
2 3 4
data totransp / view = totransp;
* Add a suitable BY variable;
__by_obs = _n_;
proc transpose data=totransp out=to_tabul;
* Should pick up all variables beginning with letter "v";
proc tabulate data=to_tabul;
class _name_ col1;
table _name_, col1*n*f=4.;
Date: Thu, 13 Jan 2000 08:43:08 -0500
Subject: Tabulate question
Greetings O wise SAS wizards near and far:
a quick aside to my question below.....Pudge, to me, will always be
remembered as a Boston Red Sock...the big home run is just too
engrained, him waving the ball fair at Fenway.
On to the question....
I had a user ask the following, and for the life of me I just can't
seem to get tabulate to produce a good likeness of his report desires.
Thoughts anyone? And thanks in advance for all efforts!!!
Capital One Financial Services, Inc.
Do you know is it possible, or how to generate a table like the
following in SAS?
In the following table, 1-5 are the values of the variables, and n are
the count/frequency of corresponding values.
Var_name 1 2 3 4 5
var1 n n n n n
var2 n n n n n
var3 n n n n n