boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Statistics版 - SAS问题请教:Numeric Variable Length的设定
相关主题
SAS format 的问题
Import excel file to sas (the first 8 or more observations
SAS quarter calculation question
包子问,SAS里data long to wide format
新人报道,兼问SAS data set的问题
sas question
问个sas 的问题
sas base 70 第 20题
a question about length assignment
[合集] SAS一问,急~!
相关话题的讨论汇总
话题: numeric话题: variable话题: length话题: sas话题: value
进入Statistics版参与讨论
1 (共1页)
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
4
This might be helpful. But it is not an easy way.
http://www2.sas.com/proceedings/forum2008/021-2008.pdf
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位...
: 多谢指教!

1 (共1页)
进入Statistics版参与讨论
相关主题
[合集] SAS一问,急~!
再问个傻问题, R的
问题请教
问道SAS ADV真题
One question about data step in sas
A SAS problem
do loop 的一道题
in =option的一道题
syntax errors
问三题SAS Base的题目
相关话题的讨论汇总
话题: numeric话题: variable话题: length话题: sas话题: value