sas - 在 PROC FREQ 中抑制 "Frequency"文本

标签 sas output

如何去掉红圈内的方框

enter image description here

代码:

data mydata;
input x y;
datalines;
    1 2
    3 4
    1 5
    3 2
;
run;

proc freq data=mydata;
    tables x*y /nopercent norow nocol;
run;

最佳答案

与 SAS 一样,有多个路径可以到达所需的结果。

如果您愿意远离 proc freq,您可以使用 proc tabulate 获得所需的输出。这提供了一个更简单(和更简洁)的解决方案,并且不需要深入研究冗长且经常令人困惑的 proc template 文档。

proc tabulate data = mydata;
    /* Specify the variables to investigate */
    class x y; 
    table
        /* Put x in the rows suppress its title and add a total row */
        x = "" all = "Total", 
        /* Put y in the columns, request a total, request frequency count*/
        (y all = "Total") * n = "" / 
            /* Put "x" in the top left box */
            box = "x" 
            /* Put 0 instead of missing */
            misstext = "0"; 
run;

关于sas - 在 PROC FREQ 中抑制 "Frequency"文本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28189087/

相关文章:

sas - 我似乎对 SAS PROC FORMAT 有舍入问题

xml - 使用 XML 架构 (xsd) 验证输出 XML

c - 在 C 的标准输出中恰好在 1 个字符之后打印一些内容

Java - 错误消息显示不正确

Java 在启动新线程之前自动等待线程完成

c# - 从 .Net 中的 SAS 数据源读取数据

SAS日期格式

sas - 过程摘要 : outputting median and quartiles

java - 格式化程序 - 显示奇怪的输出

java - 我的循环用数字七、六次填充数组,为什么?