我正在尝试将PROC TABULATE表输出到PNG文件。当我有一个表语句时,它工作正常,但是当我添加第二个时,只显示第一个。如何创建一个包含几个表的PNG,就像SAS中的结果查看器中的输出一样。
%let folder=C:/Temp/;
data have;
input username $ betdate : datetime. stake winnings;
dateOnly = datepart(betdate) ;
format betdate DATETIME.;
format dateOnly ddmmyy8.;
datalines;
player1 12NOV2008:12:04:01 90 -90
player1 04NOV2008:09:03:44 100 40
player2 07NOV2008:14:03:33 120 -120
player1 05NOV2008:09:00:00 50 15
player1 05NOV2008:09:05:00 30 5
player1 05NOV2008:09:00:05 20 10
player2 09NOV2008:10:05:10 10 -10
player2 15NOV2008:15:05:33 35 -35
player1 15NOV2008:15:05:33 35 15
player1 15NOV2008:15:05:33 35 15
run;
PROC PRINT; RUN;
Proc rank data=have ties=mean out=ranksout groups=2;
var stake;
ranks stakeRank;
run;
options printerpath=png nodate nonumber;
ods printer file="&folder/PanelA.png";
PROC TABULATE DATA=ranksout NOSEPS;
VAR stake;
class stakerank;
TABLE stakerank, stake*N;
TABLE stakerank, stake*(N Mean);
RUN;
ods printer close;
ods listing;
感谢您提供任何帮助。
答案 0 :(得分:2)
STARTPAGE选项是您想要的:
options printerpath=png nodate nonumber;
ods printer file="c:\temp\PanelA.png" startpage=never;
PROC TABULATE DATA=sashelp.class NOSEPS;
VAR height;
class sex;
TABLE sex, height*N;
TABLE sex, height*(N Mean);
RUN;
ods printer close;
ods listing;