mean(var1,var4)
mean(var1-var4)
mean(of var1,var4)
mean(of var1-var4)
data work.temp; set hrd.temp; Salary=payrate*hours; run;
123,456
.
Which statement correctly converts the values of Target to numeric
values when creating the variable TargetNo?
TargetNo=input(target,comma6.);
TargetNo=input(target,comma7.);
TargetNo=put(target,comma6.);
TargetNo=put(target,comma7.)
Location=dept||'/'||input(sitenum,3.1);
Location=dept||'/'||input(sitenum,4.1);
Location=dept||'/'||put(sitenum,3.1);
Location=dept||'/'||put(sitenum,4.1);
MDY(1,3,20)
MDY(3,1,20)
MDY(1,3,2020)
MDY(3,1,2020)
Piscataway, NJ
.
How do you assign the two-letter state abbreviations to a new variable
named State?
State=scan(address2,2);
State=scan(address2,13,2);
State=substr(address2,2);
State=substr(address2,13,2);
123FA
and 321MB
.
The fourth character identifies sex. How do you assign these character
codes to a new variable named Sex?
Sex=scan(idcode,4);
Sex=scan(idcode,4,1);
Sex=substr(idcode,4);
Sex=substr(idcode,4,1);
919-555-1234
.
Which of the following programs correctly changes the values of Phone?
data work.piedmont(drop=areacode exchange); set clients.piedmont; Areacode=substr(phone,1,3); Exchange=substr(phone,5,3); if areacode='919' and exchange='555' then scan(phone,1,3)='920'; run;
data work.piedmont(drop=areacode exchange); set clients.piedmont; Areacode=substr(phone,1,3); Exchange=substr(phone,5,3); if areacode='919' and exchange='555' then phone=scan('920',1,3); run;
data work.piedmont(drop=areacode exchange); set clients.piedmont; Areacode=substr(phone,1,3); Exchange=substr(phone,5,3); if areacode='919' and exchange='555' then substr(phone,1,3)='920'; run;
data work.piedmont(drop=areacode exchange); set clients.piedmont; Areacode=substr(phone,1,3); Exchange=substr(phone,5,3); if areacode='919' and exchange='555' then phone=substr('920',1,3); run;
data work.maillist; set retail.maillist; length FullName $ 40; fullname=trim firstname||' '||lastname; run;
data work.maillist; set retail.maillist; length FullName $ 40; fullname=trim(firstname)||' '||lastname; run;
data work.maillist; set retail.maillist; length FullName $ 40; fullname=trim(firstname)||' '||trim(lastname); run;
data work.maillist; set retail.maillist; length FullName $ 40; fullname=trim(firstname||' '||lastname); run;
ash,
cherry, teak, matte-black
. Which of the following
creates a subset of the data in which the values of Finish contain
the string walnut
? Make the search
for the string case-insensitive.
data work.bookcase; set furnitur.bookcase; if index(finish,walnut) = 0; run;
data work.bookcase; set furnitur.bookcase; if index(finish,'walnut') > 0; run;
data work.bookcase; set furnitur.bookcase; if index(lowcase(finish),walnut) = 0; run;
data work.bookcase; set furnitur.bookcase; if index(lowcase(finish),'walnut') > 0; run;
3.145.177.39