全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 SAS专版
1487 5
2012-01-30
一个data file "size“
含有数值:72 95
data a;
infile "size" ;
input@ 1 height 2. @4 weight 2;
run;
viewtable 里是
height   weight
72           2

weight 为什么是2 ?

谢谢了
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2012-1-31 02:25:20
因为你 input@ 1 height 2. @4 weight 2; 写错了
2后面忘记写. 了
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2012-1-31 09:26:16
Let's focus on the code, "input @1 height 2. @4 weight 2;", in which the number 2 after 'weight' means thet SAS would read and put the second character into 'weight' only.

And furthermore, if we write in this way, "input @1 height 2. @4 weight 1;", the value of 'weight' in dataset 'a' would be 7.
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2012-1-31 18:21:49
maidenhan 发表于 2012-1-31 09:26
Let's focus on the code, "input @1 height 2. @4 weight 2;", in which the number 2 after 'weight' mea ...
我还以为是2给weight赋值了,受教了。
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2012-1-31 22:21:09
是啊,太粗心了,谢谢各位的帮助了
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2012-4-12 19:25:32
恩,2指得是指针的位置
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群