Date: Wed, 13 Mar 1996 15:17:56 GMT
Reply-To: j.qian@cgnet.com
Sender: "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From: Jin Qian <j.qian@CGNET.COM>
Organization: IFPRI
Subject: Re: descriptive statistics
Zi Qing:
Thank you for your reply. Your suggestion works fine with small data
sets. However, I have a relatively large data set with about 500
variables of 6000 observations. Two PROC TRANSPOSE and one PROC SORT
takes too much time and space.
Currently, I just use PROC CONTENTS DATA=MYDATA SHORT; to get a print
out of all variable in the data set sorted alphabetically and
copy/paste them into the VAR statement in PROC MEANS. This will give
me ugly looking program but it sure saves time and can get the job
done.
Thanks agains for your reply.
Jin Qian
zpan@umich.edu (Ziqing Pan) wrote:
>If the number of records is not too large, the following SAS codes will work,
>data new;set YOURDATASET;
>proc transpose out=new;
>proc sort;by _name_;
>proc transpose out=new;
>data new;set new;drop _name_;/* data set:new is the sorted*/
> /* data set by variable name.*/
>Ziqing Pan
>Dept. of Biostat.
>School of Public Health
>University of Michigan
>zpan@umich.edu