由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Statistics版 - 关于SAS里TRUNCOVER一问
相关主题
HELP~~About reading sas data set[合集] SAS里如何实现LOCF(LAST OBS CARRIED FORWARD)?
#SAS BASE 问题,明天就考试了##do loop 的一道题
SAS infile input 问题菜鸟请教SAS初级编程题目。
SAS软件下载地址已失效(as of 3/23/2010)如何用SAS对ID(OBS)求SUM或者用SAS消去ID(没有ID)。
SAS base归来 一点小经验请教一个R question: 怎么读missing character data
请教下SAS Base 70题的第59题SAS base 87% pass today
SAS 求助: filenamesSAS basic question
请教sas123题中第59题。SAS求助,out of memory
相关话题的讨论汇总
话题: sas话题: truncover话题: street话题: length话题: 16
进入Statistics版参与讨论
1 (共1页)
m*****8
发帖数: 27
1
请问TRUNCOVER起的作用是什么,附件里Little SAS Book的这段话我不太懂,哪位高手
给解释一下啊?谢谢!
p********a
发帖数: 5352
2
如果没有TRUNCOVER,SAS读第一个OBS最后一个变量的时候,读22-37,但是Maple Ave.
没有16位长,SAS就继续读下一行,把Sylvia读成第一个OBS的STREET的一部分。
TRUNCOVER就是告诉SAS,最后一个变量,有多长就读多少,不要扯到下一个去。
m*****8
发帖数: 27
3
那如果这件事发生在中间而不是末尾的话(加入Maple Ave在中间,22-37也是指中间的
话),SAS应该不会继续读下去吧?

Ave.

【在 p********a 的大作中提到】
: 如果没有TRUNCOVER,SAS读第一个OBS最后一个变量的时候,读22-37,但是Maple Ave.
: 没有16位长,SAS就继续读下一行,把Sylvia读成第一个OBS的STREET的一部分。
: TRUNCOVER就是告诉SAS,最后一个变量,有多长就读多少,不要扯到下一个去。

p********a
发帖数: 5352
4
SAS will read exactly 16 characters if the field street is in the middle

【在 m*****8 的大作中提到】
: 那如果这件事发生在中间而不是末尾的话(加入Maple Ave在中间,22-37也是指中间的
: 话),SAS应该不会继续读下去吧?
:
: Ave.

m*****8
发帖数: 27
5
如果这样的话,所有的column input,不同的observation的变量长度应该一样喽?

【在 p********a 的大作中提到】
: SAS will read exactly 16 characters if the field street is in the middle
p********a
发帖数: 5352
6
Yes for column input. I am talking about the SAS length, not the visual "non
-blank" length. Here "input street $22-37" defines the length of street is $
16. If it is less than 16 characters, there should be trailing blanks.
Truncover is just the opposite of default option-Flowover. For flowover, if
the reading pointer reaches the end of record AND the length is less than 16
, it will go to the next line.
You can do a test- just put blanks at the end of the street field so it is
16 characters lo

【在 m*****8 的大作中提到】
: 如果这样的话,所有的column input,不同的observation的变量长度应该一样喽?
1 (共1页)
进入Statistics版参与讨论
相关主题
SAS求助,out of memorySAS base归来 一点小经验
请教一个sas123问题请教下SAS Base 70题的第59题
SAS -proc transpose 急问!SAS 求助: filenames
弱问SAS:如何找出两个data sets中missing的obs请教sas123题中第59题。
HELP~~About reading sas data set[合集] SAS里如何实现LOCF(LAST OBS CARRIED FORWARD)?
#SAS BASE 问题,明天就考试了##do loop 的一道题
SAS infile input 问题菜鸟请教SAS初级编程题目。
SAS软件下载地址已失效(as of 3/23/2010)如何用SAS对ID(OBS)求SUM或者用SAS消去ID(没有ID)。
相关话题的讨论汇总
话题: sas话题: truncover话题: street话题: length话题: 16