|Date: ||Tue, 12 Mar 1996 17:04:36 -0500|
|Reply-To: ||unix <chenxi@UTKUX.UTCC.UTK.EDU>|
|Sender: ||"SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>|
|From: ||unix <chenxi@UTKUX.UTCC.UTK.EDU>|
|Subject: ||Re: descriptive statistics|
If I am going to do it, I will think of the following way:
1. Run Proc Contents and save the variable names into a SAS data set.
2. Run Proc Sort to sort the name list.
3. Using data step Do loop with Retain or Macro %DO loop to concatenate
all the names along with spacing into a macro variable.
4. Run Proc Means; Var &Macroname.
The reason I am against the transpose is that it needs a lot of
unnecessary data manipulation and space. Sorry I can not write the code
for you right now.
On Tue, 12 Mar 1996, Robert Schechter wrote:
> See the description of the VAR statement in the procedures you are
> interested in. From the Means Procedure, _SAS Procedures Guide_, "The
> results are printed in the order of the variables in the VAR statement".
> There is no way I know of to specify alphabetical.
> Best of luck.
> From: Jin Qian
> To: schechte; Multiple recipients of list SAS-L
> Subject: descriptive statistics
> Date: Monday, March 11, 1996 8:12PM
> Dear SAS-Lers:
> I have a simple question about getting descriptive statistics in SAS.
> My data file has over five hundreds variables and I want to get
> descriptive statistics in alphabetical order. However, when I use
> PROC MEANS or PROC SUMMARY, what I got was a print out sorted by the
> position of all my variables in the data set. I failed to find out
> how to make it sorted alphabetically.
> Is there an option that I can set in PROC MEANS or PROC SUMMARY?
> Many thanks in advance.
> Jin Qian
> International Food Policy Research Insititute.