t*****s 发帖数: 49 | 1 ****QUESTION 47
Which one of the following statements is true regarding the name of a SAS
array?
A. It is saved with the data set.
B. It can be used in procedures
C. It exists only for the duration of the DATA step
D. It can be the same as the name of a variable in the data set.
Answer: C
我的确没有见过array用于proc step,但不明白为什么不能用呢?(why B is not
true, or say why array can only exist for the duration of the data step?)
****QUESTION 112
The contents of the raw data file SIZE are listed below: | t*****s 发帖数: 49 | 2 找到了112题以前的讨论(http://www.mitbbs.com/article_t/Statistics/31234679.html), 但不明白这篇上说的“解释是@4 weight 2因为没有一点会被认为是column input跳到第二列" 是什么意思? | d******9 发帖数: 404 | 3 Hehe.........
****QUESTION 112
input@ 1 height 2.@ 4 weight 2;
Height 2., this is formatted input. However, for Weight 2, the dot is
missing , then the "2" is a column controller, then SAS will read in the value at Column 2 in input buffer for Weight.
I encountered this before, I used the below coding to test it:
data ddtr;
Input @1 ID 2. @4 age 5 ;
cards;
10 567
29 79
38 123
;
run;
Then age= 6, 9, 2 respectively---- all located at Column 5. It appears that , when the period "." is missing in the informat, the number is then a pointer control to control the column. | d******9 发帖数: 404 | 4 ***QUESTION 47
Which one of the following statements is true regarding the name of a SAS
array?
A. It is saved with the data set.
B. It can be used in procedures
C. It exists only for the duration of the DATA step
D. It can be the same as the name of a variable in the data set.
Answer: C
我的确没有见过array用于proc step,但不明白为什么不能用呢?(why B is not
true, or say why array can only exist for the duration of the data step?)
Array is just a grouping of data, not a new dataset. it can not be used in
Proc step.
C. It exists only for the duration of the DATA step
This means:
Data A;
Array Sales (8) V1-V8;
....
...
Run;
When data step A is finished, then Array Sales is gone. If you want to use
it again in the following data step, you have to define it again:
Data B;
Array Sales (8) V1-V8; Note: You will have log errors without this
definition.
....
...
Run;
You got it?????????/ | t*****s 发帖数: 49 | 5 I got it. Thanks so much dido!!!
【在 d******9 的大作中提到】 : ***QUESTION 47 : Which one of the following statements is true regarding the name of a SAS : array? : A. It is saved with the data set. : B. It can be used in procedures : C. It exists only for the duration of the DATA step : D. It can be the same as the name of a variable in the data set. : Answer: C : 我的确没有见过array用于proc step,但不明白为什么不能用呢?(why B is not : true, or say why array can only exist for the duration of the data step?)
| t*****s 发帖数: 49 | 6 噢,那就是说 @4把pointer移到column4但没有用到,然后就接下来用column input读
weight了,pointer又回到了column2。明白了。
Thanks so much!
value at Column 2 in input buffer for Weight.
【在 d******9 的大作中提到】 : Hehe......... : ****QUESTION 112 : input@ 1 height 2.@ 4 weight 2; : Height 2., this is formatted input. However, for Weight 2, the dot is : missing , then the "2" is a column controller, then SAS will read in the value at Column 2 in input buffer for Weight. : I encountered this before, I used the below coding to test it: : data ddtr; : Input @1 ID 2. @4 age 5 ; : cards; : 10 567
|
|