gregouz1995
gregouz1995

Reputation: 53

Rename row variables names in SAS after Proc FREQ function

I do this to get a TABLE like below

PROC FREQ data=projet.matchs;
    TABLES circuit/ NOCUM;
run;
Circuit Fréquence   Pourcentage
ATP      127           50.00
WTA      127           50.00

I need exactly the same except that I want "Male" instead of ATP and "female instead of "WTA" So i tues it is a renaming function but I don't know how to use it.

Thanks for the help

Upvotes: 1

Views: 1174

Answers (1)

Tom
Tom

Reputation: 51621

Note those are not "row variable names". They are the actual (or formatted) values of your variable CIRCUIT.

Looks like you want to create a custom format to change how the values in your variable are displayed.

proc format ;
  value $gender 'ATP'='Male' 'WTA'='Female';
run;

Then tell the proc to use that format for your variable.

PROC FREQ data=projet.matchs;
    TABLES circuit/ NOCUM;
    format circuit $gender. ;
run;

Upvotes: 1

Related Questions