我有以下数据集(虚构数据):
data have;
input team $ goals_12 goals_13 var_12_13;
cards;
LIV 20 25 .25
MNC 21 24 .14
MUN 30 25 -.17
ARS 10 12 .20
CHE 23 23 0
EVE 20 18 -.1
TOT 10 0 -1
;
run;
我正在尝试为此数据集创建报告。这就是我所拥有的:
proc report data=have;
column team goals_12 goals_13 var_12_13;
define team / 'Team';
define goals_12 / analysis '2012 Goals';
define goals_13 / analysis '2013 Goals';
define var_12_13 / order analysis format=percent. mean "Variance '12 to '13";
rbreak after / summarize ul ol;
run;
ALMOST 我想要的一切。以下我无法弄清楚的事情:
答案 0 :(得分:1)
试试这个:
proc sort data=work.have; by descending var_12_13;
proc report data=have;
column team goals_12 goals_13 var_12_13;
define team / 'Team';
define goals_12 / analysis '2012 Goals';
define goals_13 / analysis '2013 Goals';
define var_12_13 / order=data analysis format=percent. mean "Variance '12 to '13" weight=goals_13;
compute team;
if _BREAK_ in ('_RBREAK_')
then do;
team="Summary";
end;
endcomp;
rbreak after / summarize ul ol;
run;