ODS RTF FILE = "H:\_SAS\Topic3BPart1.RTF"; /* Notice the x-axis label is PULSE1 - not very descriptive */ PROC SGPLOT DATA=BIO.PULSECSV; histogram pulse1; RUN; /* View the first 5 observations of the original data */ PROC PRINT DATA=BIO.PULSECSV (OBS=5); RUN; /* Show information about dataset, including list of variables */ /* VARNUM option: variables listed in order they appear in data */ PROC CONTENTS DATA=BIO.PULSECSV VARNUM; RUN; ODS RTF CLOSE; /* Create new dataset with DATA step */ /* SET statement contains old dataset name */ /* LABEL statement provides descriptive labels for variables*/ DATA BIO.PULSE_STEP1; SET BIO.PULSECSV; LABEL HEIGHT = "Height (cm)" WEIGHT = "Weight (kg)" AGE = "Age (years)" GENDER = "Gender" SMOKES = "Regular smoker?" ALCOHOL = "Regular drinker?" EXERCISE = "Frequency of exercise" TRT = "Whether the student ran or sat " PULSE1 = "First pulse measurement (bpm)" PULSE2 = "Second pulse measurement (bpm)" YEAR = "Year of class"; RUN; *OPTIONS NONUMBER NODATE; ODS RTF FILE = "H:\_SAS\Topic3BPart2.RTF" BODYTITLE STARTPAGE=NEVER; /* View the first 5 observations of the NEW data */ PROC PRINT DATA=BIO.PULSE_STEP1 (OBS=5); RUN; /* Show information about NEW dataset */ PROC CONTENTS DATA=BIO.PULSE_STEP1 VARNUM; RUN; /* Histogram for NEW data - now x-axis has descriptive label for variable */ PROC SGPLOT DATA=BIO.PULSE_STEP1; histogram pulse1; RUN; ODS RTF CLOSE;