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 are the applications primarily used by business analyst? : Sas-bi
What is program data vector (pdv) and what are its functions?
How to create an external dataset with sas code?
How would you identify a macro variable? : sas-macro
how will you location sas platform applications available from web browser? : Sas-bi
Mention what is SAS data set?
How do you test for missing values?
How to sort in descending order?
Have you used macros? For what purpose you have used? : sas-macro
How do you specify the number of iterations and specific condition within a single do loop?
If you use a symput in a data step, when and where can you use the macro variable? : sas-macro
how do you want missing values handled? : Sas programming
explain the difference between proc means and proc summary?
In ARRAY processing, what does the DIM function do?
What is the maximum length of the macro variable? : sas-macro