g******d 发帖数: 231 | 1 要处理一个ID变量,原来是string variable, 25位长度,现在想把它转成numeric, 同
时还要保存25位的精度,请问怎么操作?
在补充一下:操作的最终目的是和另外一个6位长的numeric variable一起uniquely identify 一个observation。请问有什么高招?
刚刚试了用length statement, 结果说最多不能超过8位...
多谢指教! |
k*******a 发帖数: 772 | 2 试试
x=1*x
x是你的character格式的数据 |
g******d 发帖数: 231 | 3 还是不行 -
原来的 string value: 2420010501630937298237411
转变后的 numeric value: 2.42E24,于是在2.42之后的具体数值就都lost了。 |
d**********r 发帖数: 24123 | |
A*******s 发帖数: 3942 | 5 the largest accurate integer with 8 bytes is 9,007,199,254,740,992. but 2.
42E24 is just the formatted value.
data a;
length b 8;
a="2420010501630937298237411";
b=a*1;
put b best25.;
run;
【在 g******d 的大作中提到】 : 还是不行 - : 原来的 string value: 2420010501630937298237411 : 转变后的 numeric value: 2.42E24,于是在2.42之后的具体数值就都lost了。
|
l*********s 发帖数: 5409 | 6 why would you translates an id to numeric value?
identify 一个observation。请问有什么高招?
【在 g******d 的大作中提到】 : 要处理一个ID变量,原来是string variable, 25位长度,现在想把它转成numeric, 同 : 时还要保存25位的精度,请问怎么操作? : 在补充一下:操作的最终目的是和另外一个6位长的numeric variable一起uniquely identify 一个observation。请问有什么高招? : 刚刚试了用length statement, 结果说最多不能超过8位... : 多谢指教!
|