Resources

Documentation Examples for SASHELP Data Sets

/****************************************************************/
/*          S A S   S A M P L E   L I B R A R Y                 */
/*                                                              */
/*    NAME: SASHELP                                             */
/*   TITLE: Documentation Examples for SASHELP Data Sets        */
/* PRODUCT: STAT                                                */
/*  SYSTEM: ALL                                                 */
/*    KEYS:                                                     */
/*   PROCS: REG, PRINT, FREQ, CONTENTS                          */
/*    DATA:                                                     */
/*                                                              */
/* SUPPORT: saswfk                UPDATE: July 25, 2010         */
/*     REF:                                                     */
/*    MISC:                                                     */
/****************************************************************/

proc reg data=sashelp.Class;
   model weight = height;
run; quit;

/*---------------Uncomment to run these next steps----------------
ods select none;
proc contents data=sashelp._all_;
   ods output members=m;
run;
ods select all;

proc print;
   where memtype = 'DATA';
run;

proc contents data=sashelp._all_;
run;
*/

title 'Baseball Data';
proc contents data=sashelp.Baseball varnum;
   ods select position;
run;

title 'The First Five Observations Out of 322';
proc print data=sashelp.Baseball(obs=5);
run;

title 'Bone Marrow Transplant Data';
proc contents data=sashelp.BMT varnum;
   ods select position;
run;

title 'The First Five Observations Out of 137';
proc print data=sashelp.BMT(obs=5);
run;

title 'The Risk Group Variable';
proc freq data=sashelp.BMT;
   tables group;
run;

title 'Birth Weight Data';
proc contents data=sashelp.BWeight varnum;
   ods select position;
run;

title 'The First Five Observations Out of 50,000';
proc print data=sashelp.BWeight(obs=5);
run;

title 'Class Data';
proc contents data=sashelp.Class varnum;
   ods select position;
run;

title 'The Full Data Set';
proc print data=sashelp.Class;
run;

title 'Comet Data';
proc contents data=sashelp.Comet varnum;
   ods select position;
run;

title 'The First Five Observations Out of 4050';
proc print data=sashelp.Comet(obs=5);
run;

title 'El Nino Southern Oscillation Data';
proc contents data=sashelp.ENSO varnum;
   ods select position;
run;

title 'The First Five Observations Out of 168';
proc print data=sashelp.ENSO(obs=5);
run;

title 'Finland''s Lake Laengelmaevesi Fish Catch Data';
proc contents data=sashelp.Fish varnum;
   ods select position;
run;

title 'The First Five Observations Out of 159';
proc print data=sashelp.Fish(obs=5);
run;

title 'The Fish Species Variable';
proc freq data=sashelp.Fish;
   tables species;
run;

title 'Exhaust Emissions Data';
proc contents data=sashelp.Gas varnum;
   ods select position;
run;

title 'The First Five Observations Out of 171';
proc print data=sashelp.Gas(obs=5);
run;

title 'The Fuel Type Variable';
proc freq data=sashelp.Gas;
   tables fuel;
run;

title 'Fisher (1936) Iris Data';
proc contents data=sashelp.Iris varnum;
   ods select position;
run;

title 'The First Five Observations Out of 150';
proc print data=sashelp.Iris(obs=5);
run;

title 'The Iris Species Variable';
proc freq data=sashelp.Iris;
   tables species;
run;

title 'Junk E-Mail Data';
proc contents data=sashelp.JunkMail varnum;
   ods select position;
run;

title 'The First Five Observations Out of 4601';
proc print data=sashelp.JunkMail(obs=5) heading=horizontal;
run;

title 'Leukemia Training Data';
proc contents data=sashelp.LeuTrain varnum;
   ods select position;
run;

title 'The First Five Observations and Eleven Variables';
proc print data=sashelp.LeuTrain(obs=5);
   var y x1-x10;
run;

title 'Leukemia Type Variable';
proc freq data=sashelp.LeuTrain;
   tables y;
run;

title 'Leukemia Test Data';
proc contents data=sashelp.LeuTest varnum;
   ods select position;
run;

title 'The First Five Observations and Eleven Variables';
proc print data=sashelp.LeuTest(obs=5);
   var y x1-x10;
run;

title 'Leukemia Type Variable';
proc freq data=sashelp.LeuTest;
   tables y;
run;

title 'Margarine Data';
proc contents data=sashelp.Margarin varnum;
   ods select position;
run;

title 'The First Five Observations Out of 20,430';
proc print data=sashelp.Margarin(obs=5);
run;

title 'Coal Seam Thickness Data';
proc contents data=sashelp.Thick varnum;
   ods select position;
run;

title 'The First Five Observations Out of 75';
proc print data=sashelp.Thick(obs=5);
run;

title 'Flying Mileages between Five US Cities Data';
proc contents data=sashelp.Mileages varnum;
   ods select position;
run;

title 'The Full Data Set';
proc print data=sashelp.Mileages heading=horizontal;
   id city;
run;