1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
DATA maLib.titanic;
INFILE "C:/USERS/MY-HP/DESKTOP/DM/TD1/titanic.dat" DLM="," FIRSTOBS=2;
INPUT Claasse Age Sexe Survecu;
RUN;
PROC FORMAT;
VALUE Classe
0='Equipage'
1='Riches'
2='Pauvres'
3='Autres';
VALUE Sexe
0='Femme'
1='Homme';
VALUE Survecu
0='Non'
1='Oui';
RUN;
DATA maLib.nouvTitanic ( rename= ( _classe=classe _sexe=sexe _survecu=survecu)) ;
SET maLib.titanic;
_Classe=PUT(Classe,Classe.);
*KEEP Age;
_Sexe=PUT(Sexe,Sexe.);
_Survecu=PUT(Survecu,Survecu.);
drop class sexe survecu;
RUN; |
Partager