Chapter 13: Transforming Data with SAS Functions
-
Which function calculates the average of the variables Var1, Var2, Var3, and Var4?
-
mean(var1,var4)
-
mean(var1-var4)
-
mean(of var1,var4)
-
mean(of var1-var4)
Correct answer: dUse a variable list to specify a range of variables as the function argument. When specifying a variable list, be sure to precede the list with the word OF. If you omit the word OF, the function argument might not be interpreted as expected. -
-
Within the data set Hrd.Temp, PayRate is a character variable and Hours is a numeric variable. What happens when the following program is run?
data work.temp; set hrd.temp; Salary=payrate*hours; run;
-
SAS converts the values of PayRate to numeric ...
-
Get SAS Certification Prep Guide: Base Programming for SAS 9, Third Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.