gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-04 18:45:32 24 4
gpt4 key购买 nike

如何去掉红圈内的方框

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/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com