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
What is slibref?
What is the difference between nodupkey and nodup options?
Are you involved in writing the inferential analysis plan? Tables specifications?
Differences between where and if statement?
what is data access? : Sas-di
what are some problems you might encounter in processing missing values? In data steps? Arithmetic? Comparisons? Functions? Classifying data? : Sas programming
what do the pad and dim functions do? : Sas programming
What is program data vector (pdv) and what are its functions?
Explain by-group processing?
What is by-group processing?
what is the function of catx syntax? : Sas-administrator
What is auto call macro and how to create a auto call macro? What is the use of it? How to use it in sas with macros? : sas-macro
what is sas data set?
What are the data types in sas?
What are the functions used for character handling?