简体   繁体   中英

SAS - proc tabulate - background

when I run the following code in SAS

DATA TEST2;
input A1 B1 C1;
cards;
1 6 0
1 6 1
2 7 0
2 6 1
2 6 0
1 7 0
1 7 1
run;

proc format ;
 value couleur
   low - 50 = "red"
   50- 100 = "green"
   . = "white"
 ;
run ;

proc tabulate data=test2;
CLASS A1 B1 C1 /missing;
TABLE A1,
      B1*C1*(N PCTN<C1>* [style=[background=couleur.]])*(F=4.) ALL*F=7. /RTS=8
     ;
run;

it gives me

proc tabulate

What should I do when I want the color coding to be applied only to percentages (columns), where C1=1? Thanks in advance for answers.

PROC TABULATE DATA=TEST;
    CLASS A1 B1 C1 /MISSING;
    TABLE A1,
        B1*C1*(N (PCTN<C1> * [STYLE=[BACKGROUND=couleur.]]))* (F=4.) ALL*F=7. /RTS=8;
RUN;

Is this what you mean?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM