SAS 在 proc 中返回 sci-notation 意味着总和输出,我不能将其用于进一步的速率计算过程。如何抑制 SAS 产生 sci-notation,有什么想法吗?提前致谢。
“解决了一个类似但不太适用于这种情况的问题。如果我错过了修改该答案的正确方法,我深表歉意”。
data non.test;
input year racecat outcome grand_total;
datalines;
1995 1 1585 9988998
1995 2 268 9966565
1996 2 1574 5569885
1996 2 230 2366558
1997 1 1482 3366998
;
run;
proc sort data=non.test;
by year racecat;
proc means data=non.test noprint;
var outcome grand_total;
class year racecat;
output out=non.test(where=(year ne . and racecat ne .) drop=_type_ _freq_)
sum(outcome) = by_outc
sum(grand_total)=Grand_total;
run;
最佳答案
如果您希望以不同于默认 BEST12.
的格式显示值,请使用 FORMAT 语句更改它。
proc print data=non.test ;
format grand_total comma20.;
run;
如果您在初始数据集中分配格式,那么 PROC MEANS 也会将其分配给输出数据集中的派生字段。
关于sas - 告诉 SAS 不要产生科学记数法,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41663350/