SAS OnlineTutorback||next

Try It! Using the Clinic.Admit data set, add cell traffic-lighting.

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';
   value agealert low-29='lio'
                  other='vpag';
run;
proc tabulate data=clinic.admit format=4.1;
   var age / style=<parent>;
   class sex actlevel / style={background=vpag};
   classlev sex / style={background=$colsex.};
   classlev actlevel / style=<parent>;
   table sex*actlevel*age*{style={
         background=agealert.
         font_weight=bold foreground=black}},
         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 statement to create a user-defined format for flyover text. Name the format AGEFLYOV and repeat the ranges you used for AGEALERT:

    • low-29=' Could be a problem '

    • other=' ' (Leave blank.)

  4. Apply the format by setting the Age variable's flyover attribute to AGEFLYOV. in the TABLE statement.

  5. Submit the program and view its output in your browser. Hold your mouse pointer over the orange data cell.

    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