全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 SAS专版
5176 4
2013-01-02

请教各位大师啊!!!

我想要的是这样的图:

Sex

Height

Weight


F

60.588889

90.111111



M

63.91

108.95

就是每个组别(sex)下有横线,而且带有一个空白行。


但是我却只能得到这样的图;

Sex

Height

Weight


F

60.588889

90.111111



M

63.91

108.95


这是我的程序;

proc template;
define style Styles.Threelines;
parent = Styles.Default;
/*title*/
style SystemTitle /
FONT_FACE = " Times New Roman, Comic Sans MS, Helvetica, sans-serif"
/*work style(font)ziti   These are the 3 choices of font being requested, in order of preference.*/
FONT_SIZE = 5
/* work size*/
FONT_WEIGHT = bold
FONT_STYLE = roman
/*FONT_STYLE = italic,italic is not upright word*/
FOREGROUND = midnightblue
/*word color*/
BACKGROUND = white;
/* back color*/
/*footnote*/
STYLE SystemFooter /
FONT_FACE = " Times New Roman, Comic Sans MS, Helvetica, sans-serif"
FONT_SIZE = 2
FONT_WEIGHT = bold
FONT_STYLE = italic
FOREGROUND = black
BACKGROUND = white;
/*column header*/
STYLE Header /
FONT_FACE = "Times New Roman, Helvetica, sans-serif"
FONT_SIZE = 4
FONT_WEIGHT = medium
FONT_STYLE = roman
FOREGROUND = black
BACKGROUND = white;
STYLE RowHeader from header /
BACKGROUND = white;
/*TABLE CELLS*/
STYLE Data /
FONT_FACE = "Times New Roman, Helvetica, sans-serif"
FONT_SIZE = 2
FONT_WEIGHT = medium
FONT_STYLE = roman
FOREGROUND = black
BACKGROUND = white;
/*lines around and inside the table,,called borders and rules*/
STYLE Table /
FOREGROUND = black
BACKGROUND = white
CELLSPACING = 0
CELLPADDING = 3
FRAME = HSIDES/*controls the border that runs around the outside of the table.*/
RULES = groups;/*controls rules and borders */
STYLE Body /
FONT_FACE = "Times New Roman, Arial, Helvetica, sans-serif"
FONT_SIZE = 3
FONT_WEIGHT = medium
FONT_STYLE = roman
FOREGROUND = black
BACKGROUND = white;
/*ODS creates a table to hold the title, and a table to hold the footnote. To make the boxes go away*/
STYLE SysTitleAndFooterContainer /
CELLSPACING=0;
end;
run;


ods rtf file="F:\pratise.rtf" style=Threelines;


proc report

data=sashelp.class nowd;

column sex height weight;

define

sex/group;

define height/analysis n mean;

define weight/analysis n

mean;

compute after sex;

line "";

endcomp;

run;

ods rtf close;


二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2013-1-2 16:07:02
不好意思,图上传的有点问题
一下为正确的图:
附件列表
未命名1.jpg

原图尺寸 8.8 KB

程序出来的图

程序出来的图

未命名.jpg

原图尺寸 7.66 KB

想要的图

想要的图

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2013-1-2 20:45:16
那就不用compute语句,而是将空行写进数据集里。
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2013-1-2 21:43:31
ttklkl 发表于 2013-1-2 20:45
那就不用compute语句,而是将空行写进数据集里。
空行怎么写进数据集呢?
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2013-1-2 22:13:01
这样:compute after sex/style={background=white}; line "" ;
endcomp;
可以把空白行底色变白
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群