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
If you use a symput in a data step, when and where can you use the macro variable? : sas-macro
How to convert a numeric variable to a character variable?
Differences between where and if statement?
Briefly explain input and put function?
For what purposes have you used sas macros? : sas-macro
what is PhaseIII, ODS, TLG, Macro and Proc in SAS
Tell e how how dealt with..
What is SAS? What are the functions does it performs?
what is the use of sas management console? : Sas-di
What are symget and symput? : sas-macro
How will you react when, while consulting a SAS documentation manual to get an answer to a problem, someone says hey, I thought you were supposed to know all that stuff already, and not have to look it up in a book?
explain about sas business intelligence? : Sas-bi
explain the function of substr in sas? : Sas-administrator
Name any two sas spawners? : sas-grid-administration
name several ways to achieve efficiency in your program? : Sas programming