/*SAS CODING*/
data class;
set sashelp.class;
if Name = “Alfres” then Age = . ;
if Name = “Alice” then Sex = ” “;
if Name = “John” then Weight = . ;
run;
/*SQl CODE*/
proc sql;
select sum(missing(Age)) as Age_missing,
sum(missing(Sex)) as Sex_missing,
sum(missing(Weight)) as Weight_missing from class;
quit;
Leave a Reply
You must be logged in to post a comment.