Hi guys,
suppose to have the following:
data have;
input ID :$20. Admission :date09. Discharge :date09. Variable1 Variable2;
format Admission date9. Discharge date9.;
cards;
0001 13JAN2015 20JAN2015 1 0
0001 21FEB2015 31DEC2015 . .
0001 21FEB2015 31DEC2015 0 1
;
Is there a way to swap rows with missing values to have the following?
Rows with missing values are present only when there are identical and replicated rows.
data have1;
input ID :$20. Admission :date09. Discharge :date09. Variable1 Variable2;
format Admission date9. Discharge date9.;
cards;
0001 13JAN2015 20JAN2015 1 0
0001 21FEB2015 31DEC2015 0 1
0001 21FEB2015 31DEC2015 . .
;
Thank you in advance