SAS OnlineTutorback||next

Try It! Using the Clinic.Admit data set, inherit style attributes across table cells.

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 format;
   value $colsex 'F'='lipk'
                 'M'='vpab';
run;
proc tabulate data=clinic.admit 
     format=4.1;
   var age;
   class sex actlevel / 
         style={background=vpag};
   classlev sex / 
            style={background=$colsex.};
   table sex*actlevel*age,mean /
         box={style={background=vpag}};
   keyword mean / 
           style={background=vpag};
run;
ods html close;
ods listing;
  1. 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.

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

  3. Recall the program and add a CLASSLEV statement with a STYLE= option to make the ActLevel class level headings inherit styles from the levels of Sex.

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

  5. Recall the program again and edit the VAR statement to make the Age headings inherit styles from the ActLevel headings.

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

  7. Recall the program again and edit the TABLE statement to make the Age data cells inherit styles from the Age headings.

  8. 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