Dear R users -

I have a list of patient identifiers and diagnoses from inpatient
admissions.  I would like to reorganize the list, presently in a long
format to a wide format in reshape, but in the absence of a "time" element,
I am uncertain how to do this - any help greatly appreciated.

ID   Dx
A    nausea
A    diabetes
A    kidney failure
A    heart attack
A    fever
B    fever
B    pneumonia
B    heart attack
B    nausea
B    cough
C    kidney failure
C    nausea
C    foot pain

I want this to be
ID    nausea  diabetes  kidney_failure  heart_attack  fever  pneumonia
A          1            1             1                   1              1
        0
B          0            0             0                   1              1
        1


R. Matthew Strother, MD
Clinical Pharmacology
Medical Oncology

	[[alternative HTML version deleted]]

