SAS OnlineTutorback||next

Try It! Using the Clinic.Admit data set, apply styles to class level headings.

Creating HTML output? Read this first.

  1. Copy the following program and paste it into the Program Editor window (or issue the command copy sashelp.oltutor..source).
    ods listing close;
    ods html path='?' body='?';
    proc tabulate data=clinic.admit 
         format=4.1;
       var age;
       class sex actlevel / 
             style={background=vpab};
       table sex*actlevel*age,mean /
             box={style={background=papk}};
       keyword mean / 
               style={background=papk};
    run;
    ods html close;
    ods listing;
    
    
  2. Replace the question marks (?) with PATH= and BODY= values that conform to your system's file structure. Remember that you can use the URL= suboption in PATH=, BODY=, or both.

  3. Submit the program and view its output in your browser.

  4. Recall the program and add a CLASSLEV statement and STYLE= option to change the background color of the levels of Sex. Use either SAS/GRAPH color names or RGB values.

  5. Submit the program and view its output in your browser.

  6. Recall the program again and create a user-defined format to specify different colors for the values of Sex. Change the STYLE= option in the CLASSLEV statement to apply the new format.

  7. Submit the program and view its output in your browser.

    Return here and select Next.

Solution
back||next


Copyright © 2002 SAS Institute Inc., Cary, NC, USA.
All rights reserved.

Terms of Use & Legal Information | Privacy Statement