标题: 求助:数据的变换? [打印本页] 作者: shiyiming 时间: 2009-12-22 15:35 标题: 求助:数据的变换? 求助:数据的变换?
下面的程序:
data a;
input x;
cards;
1234567891
;
run;
data b;
set a;
format w 8.2;
w=x/100000000;
run;
data c;
set b;
length text $ 8.;
text=cats(w);
y=w;
run;
求助: 想在数据集C中,得到字符型数据text (保留w的2位小数)、和y (保留w的2位小数)。
另问:cats语句是什么意思?
谢谢!!!作者: shiyiming 时间: 2009-12-22 23:15 标题: Re: 求助:数据的变换? you can find the defination of the CATS() function from SAS help document.
the function to convert numeric value to charactor value is PUT(), i.e. text=put(w,8.2);y=input(text,8.2);作者: shiyiming 时间: 2009-12-23 09:44 标题: Re: 求助:数据的变换? 谢谢指教!!