icysue
请教两个sas题
1387
3
2007-11-01 16:36:00
1. the following SAS program is submitted
data work.test;
First='Ipswich, England';
City_Country=substr(First,1,7)!!','!!'England';
run;
which one of the following is the length of the variable City_Country in the
output data set?
A. 6 B. 7 C. 17 D. 25
2. The following SAS program is submitted:
data work.test;
Title='A Tale of two cities, Charles J.Dickens';
Word=scan(title,3,',');
run;
Which one of the following nisthe value of the variable WORD in the output
data set?
A. T B. of C. Dickens D.' ' (missing character value)
多谢!
1. should be 'Ipswich,England' (no space after ,). I count it as 15, no correct answer? Or maybe the question should be
City_Country=substr(First,1,7)!!' , '!!'England';
2. should be D. missing value since "," is the seperator.
我都不能理解
第一个我觉得length应该是200,是scan的default length
第二个我和你一致,因为第三个seperater不存在,所以是missing value
到底了
Hot Deals
All Deals