Code a PROC MEANS that shows both summed and averaged
output of the data.
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / sreekanth rao
please correct me if my thought process is wrong.
question is to show only sum and avg...
proc means data=test sum mean;
by var (optional);
run;
here we are req only for sum mean. use out=new data set
name to print most recent data set.
Thanks
hi friends expecting the ansewrs.
Thanks
Sreekanth rao
Is This Answer Correct ? | 3 Yes | 5 No |
Answer / sumit
proc means data=work.emp sum mean;
class deptno;
var sal;
run;
Is This Answer Correct ? | 0 Yes | 2 No |
Answer / venkatesh.layam
proc means data=sashelp.calss means sum=total;
class gender;
var age;
run;
Is This Answer Correct ? | 0 Yes | 3 No |
Answer / srini
Proc Means data=test noprint;
var var1 var2(optional)
output out=newdataset
sum= mean=;
run;
Is This Answer Correct ? | 0 Yes | 8 No |
In sas, what are the areas that you are most interested in? : sas-grid-administration
what is snowflake schema? : Sas-di
Hi, I need to create a SAS Map of USA using SAS Graphs(Proc Gmap).The data i have dosent contain any co-ordinates of USA cities or counties or states, and the zip codes are diffrent in the data i have from the zip code in the Maps.US dataset in the Maps Library for SAS MAPS. the data i have is a sales report. i have to generate the maps according to the states,cities aligned in the sales data, HELP Appriciated
How to display duplicate observations in data?
Differentiate between format and informat? : sas-grid-administration
i have one dataset data l; input name: $ 25; cards; manoj is a good boy to krishna krishna is a god boy to malli malli is good boy to ramana ques: here i want "manoj" observations nubers
How to read multiple excel sheets from a single excel file at once????
7 Answers HCL, Verinon Technology Solutions,
Below is the table. Required to be output should be the highest number of each student_id. Example. Student_id Subject Marks 1 Hindi 86 2 Hindi 70 3 English 80 . Calculate sum and average marks for each group of student_id Example. Student_id Subject Marks Total Marks Average 1 English 40 181 60.33333 2 English 67 196 65.33333 3 English 80 160 53.33333 PLEASE PROVIDE THE CODE OF ABOVE PROBLEMS
my problem is to export my report to xsl.i can do that.but the problem is my report has 3 headings first heading should be printed with the merging of (1-5)cells and heading 2 should be of merge(2-4)cells?how to do this condition?
How to limit decimal places for variable using proc means?
Why double trailing @@ is used in input statement?
what is sas data set?