从PROC REPORT合并输出RTF中的单元格

时间:2016-01-14 14:21:06

标签: merge sas output rtf

在线查看后并没有找到我需要的内容 - 是否可以使用PROC REPORT在输出RTF文件中向下合并单元格?以下是我PROC REPORT的具体研究日示例:

enter image description here

在某些研究日,有多个Tukey结果,如本例所示。对于其他人,有单行没有Tukey结果,因此不需要合并。我希望我的表能够这样输出:

enter image description here

以下是我的SAS代码 - 可以添加任何内容,还是需要在我正在使用的自定义模板中进行更改?

ODS RTF FILE="&RESULTS\TEST.RTF" STYLE=CUSTOM;
proc report data = test nofs;
    column DAY _1 _2 _3 _4 _5 SHIFT_P STR;
    define DAY / group "Study Day" order=data;    
    define _1 / group "1";
    define _2 / group "2";
    define _3 / group "3";
    define _4 / group "4";
    define _5 / group "5";
    define SHIFT_P / group "Group Effect P-Value";    
    define STR / display "Estimated Difference (Relationship) Tukey's P-Value";
run;
ODS RTF CLOSE;

1 个答案:

答案 0 :(得分:2)

您可以在var Queues = [ [1, '#FFFFFF', 'line', true, [20,20], [80,80], 500, 950], [2, '#FFFFFF', 'line', true, [80,80], [55,20], 950, 1200] ]; var playing = false; $(document).click(function(){ if(playing == false) { var audio = document.getElementById("audio"); audio.currentTime = 0; audio.play(); apparatus(); playing = true; } else { var audio = document.getElementById("audio"); audio.pause(); playing = false; $('body canvas').remove(); } }); function apparatus() { var canvas, context, toggle, time = 0, vidtime = 0; var points = []; init(); function init() { canvas = document.createElement( 'canvas' ); context = canvas.getContext( '2d' ); canvas.width = $(document).width(); canvas.height = $(document).height(); document.body.appendChild( canvas ); } var point = function(options) { this.position = {}, this.end_position = {}, this.distance = {}, this.velocity = {}, this.time = {}; points.push(this); // TIMING this.time.start = options[6]; this.time.end = options[7]; // VECTORS this.position.x = options[4][0] * (canvas.width / 100); this.position.y = options[4][1] * (canvas.height / 100); this.end_position.x = options[5][0] * (canvas.width / 100); this.end_position.y = options[5][1] * (canvas.height / 100); this.distance.x = Math.abs(this.position.x - this.end_position.x); this.distance.y = Math.abs(this.position.y - this.end_position.y); if(this.position.x > this.end_position.x) { this.velocity.x = -Math.abs(this.distance.x / (this.time.end - this.time.start)); } else { this.velocity.x = Math.abs(this.distance.x / (this.time.end - this.time.start)); } if(this.position.y > this.end_position.y) { this.velocity.y = -Math.abs(this.distance.y / (this.time.end - this.time.start)); } else { this.velocity.y = Math.abs(this.distance.y / (this.time.end - this.time.start)); } // STYLING this.style = options[2]; this.color = options[1]; //-- STYLING / STYLE TYPES if(this.style == 'line') { } } point.prototype.draw = function() { this.position.x += this.velocity.x; this.position.y += this.velocity.y; context.fillStyle = this.color; context.beginPath(); context.arc( this.position.x, this.position.y, 10, 0, Math.PI * 2, true ); context.closePath(); context.fill(); } setInterval(function(){ time++; console.log(time); context.fillStyle = '#000000'; context.fillRect(0, 0, $(document).width(), $(document).height()); for(var i = 0; i < Queues.length; i++) { if(time == Queues[i][6]) { new point(Queues[i]); } if(time == Queues[i][7]) { console.log('la'); } } for(var i = 0; i <= points.length; i++) { if(points[i] != null) { points[i].draw(); } } }, 1); } 声明中使用SPANROWS选项。这是一个简化的例子:

PROC REPORT

ODS RTF FILE="c:\temp\TEST.RTF"; proc report data = SASHELP.CARS nofs spanrows; column Make Origin Drivetrain; define Make / group "Make" order=data ; define Origin / group "Origin"; define Drivetrain / group "Drivetrain"; run; ODS RTF CLOSE; 自9.2起可用。