Skip to content

Instantly share code, notes, and snippets.

@mepsrajput
Created April 24, 2022 08:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mepsrajput/0fb1cde5cd7e919d3f291703a234b121 to your computer and use it in GitHub Desktop.
Save mepsrajput/0fb1cde5cd7e919d3f291703a234b121 to your computer and use it in GitHub Desktop.
title "Simple proc means";
/* Simple proc means */
PROC MEANS DATA=SASHELP.CARS;
RUN;
title "Select the required variables & drop the labels";
/* Select the variables & drop the labels */
PROC MEANS DATA=SASHELP.CARS nolabels;
var
EngineSize
Cylinders;
RUN;
title "Select only the required descriptive statistics";
/* Select the required descriptive statistics */
PROC MEANS DATA=SASHELP.CARS N NMISS MIN MEAN MAX nolabels;
var
EngineSize
Cylinders;
RUN;
/* ods noproctitle; */
title "Group the results by another var";
/* Group the results by another var */
PROC MEANS DATA=SASHELP.CARS MEAN NONOBS NOLABELS MAXDEC=2;
CLASS Type;
var
EngineSize;
RUN;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment