楼主: 朱雀石
6846 4

[有偿编程] SAS report过程中如何给表格加上行标题 [推广有奖]

  • 0关注
  • 0粉丝

高中生

40%

还不是VIP/贵宾

-

威望
0
论坛币
857 个
通用积分
0
学术水平
0 点
热心指数
0 点
信用等级
0 点
经验
56 点
帖子
4
精华
0
在线时间
51 小时
注册时间
2019-2-4
最后登录
2023-5-17

楼主
朱雀石 发表于 2019-6-5 09:30:33 |AI写论文
15论坛币
ods listing close;                                                                                                                     
ods rtf file= "D:\大三\SAS\second\a.rtf" style = journal ;    /*表格导出成rtf文件*/                                                     
options formchar="|____|+|___+=|-/\<>*" ;                     /*定义output的字符格式,保证电脑之间跑出output效果的一致性*/              
proc report data=outr2 headline headskip nocenter nowd;                                                                                 
column ('--' y1 y2 y3 y4 y5);                                                                                                           
title '三因子模型:市场因子、规模因子SMB、价值因子HML';                                                                                 
title2 ' Adjusted R-square';                                                                                                            
define y1/display format=6.4 width=10 'HML1';                                                                                          
define y2/display format=6.4 width=10 'HML2';                                                                                          
define y3/display format=6.4 width=10 'HML3';                                                                                          
define y4/display format=6.4 width=10 'HML4';                                                                                          
define y5/display format=6.4 width=10 'HML5';                                                                                          
compute after;                                                                                                                          
line '';                                                                                                                                
line @3 60*'_';     /*从第三列开始画48个短横线,最后达到一条直线的效果*/                                                               
endcomp;                                                                                                                                
run;                                                                                                                                    
ods rtf close;                                                                                                                          
ods listing;      

上面的代码将outr2数据集中5x5数据集输出到如图表格,但是缺少行标题,请问如何加上行标题“SMB1” “SMB2”“SMB3”“SMB4”“SMB5”.
另外请问如何让标题居中
恳请大佬赐教!                        

关键词:Report repor repo Port proc report

沙发
朱雀石 发表于 2019-6-5 09:32:05
这个是截图

三线表.png (119.75 KB)

三线表.png

藤椅
Cecilia_Xi 在职认证  发表于 2020-3-4 20:39:15
可以在proc report data=outr2 headline headskip nocenter nowd 后用STYLE<(location(s))>=<style-override(s)>

如(标题为Table 1):proc report data=outr2 headline headskip nocenter nowd
                              style(report)={pretext="Table 1" just=center font=("arial",12pt, bold) frame=hsides rules=groups};  

板凳
Cecilia_Xi 在职认证  发表于 2020-3-4 20:39:58
可以在proc report data=outr2 headline headskip nocenter nowd 后用STYLE<(location(s))>=<style-override(s)>

如(标题为Table 1):proc report data=outr2 headline headskip nocenter nowd
                              style(report)={pretext="Table 1" just=center font=("arial",12pt, bold) frame=hsides rules=groups};  

报纸
whymath 发表于 2020-3-4 21:18:26
删去 headskip nocenter 选项即可

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注cda
拉您进交流群
GMT+8, 2025-12-9 09:19