Help using Base SAS procedures

How to eliminate statistic in heading of OUT data set in PROC TABULATE

Reply
Occasional Contributor
Posts: 14

How to eliminate statistic in heading of OUT data set in PROC TABULATE

When I create an output data set in PROC TABULATE, the column heading includes the statistic for each variable.  For instance, the summed FEED variable is labeled "FEED_Sum".  Can I suppress the "Sum"?

Super User
Posts: 11,343

Re: How to eliminate statistic in heading of OUT data set in PROC TABULATE

Posted in reply to cjmcgath_verizon_net

You could rename the variable(s) (data set option on the next step that uses the data OR proc datasets) but if you are asking for 2 or more statistics for the same variable then what? You can't rename Feed_Sum and Feed_N to the same thing.

It may be that you could do a similar summary with Proc means/summary as then a single statistic could retain the original variable name.

Super User
Posts: 19,867

Re: How to eliminate statistic in heading of OUT data set in PROC TABULATE

Posted in reply to cjmcgath_verizon_net

Yes. It helps if you post your code but something like the following. Note that it is =with single or double quotes that are empty which erases the label.  You can also add in a custom label if you wanted.

proc tabulate data=sashelp.cars;

class make model;

var mpg_city mpg_highway;

table make*model, mpg_city*mean='' mpg_highway*mean='';

run;

Ask a Question
Discussion stats
  • 2 replies
  • 166 views
  • 6 likes
  • 3 in conversation