my data set has two variables ID
and diagnosis
. I am trying to assign row numbers in my dataset based on ID
and diagnosis
.
the code that I used was;
proc sort data = temp;
by ID diagnosis;
run;
proc rank data = temp out = temp1;
by id;
var diagnosis;
ranks = diag_rank;
run;
Its giving mr error: the variable diagnosis in list does not match the type
I know my diagnosis has both text and numric values. Is there a way to fix this. Thanks a lot.