Code a PROC MEANS that shows both summed and averaged
output of the data.
Answer Posted / amit nakrani
I think we can do it in following way. Please correct me if
it is wrong.
proc means noprint data = sourcedata;
var var1 var2;
by var3;(optional)
output out = newdata
sum(var1,var2) = SumVar1 SumVar2
mean(var1,var2) = MeanVar1 MeanVar2;
run;
proc print data = newdata;
run;
Is This Answer Correct ? | 9 Yes | 2 No |
Post New Answer View All Answers
How will you generate test data with no input data?
Differences between where and if statement?
what is sas application server? : Sas-di
how would you create multiple observations from a single observation? : Sas programming
What’s the difference between var b1 – b3 and var b1 — b3?
Do you need to compute new variables? If so,should you do this before you execute the report-writing procedure?
what is a method for assigning first.var and last.var to the by groupvariable on unsorted data? : Sas programming
What will calendar procedure do?
Tell me more about the parameters in macro? : sas-macro
What is the use of the %include statement?
what versions of sas have you used (on which platforms)? : Sas programming
how are numeric and character missing values represented internally? : Sas programming
explain the difference between alternate key, business key, foreign key, generated key, primary key, retained key and surrogate key ? : Sas-di
explain the key concept of sas? : Sas-administrator
what is data access? : Sas-di