I have a database with disease condition per person. Each ID represents a person. I made 1= have disease 0= don't have the disease.
I want to merge each data entry horizontally into a single summary cell for each data entry. So, I am able to get a string of unique 0 and 1.
image : https://docs.google.com/document/d/1ijMlhjrKqlL3uYDaeloL3JrImkC3BjbOUy8oBOn7ThM/edit?usp=sharing
Thanks!
I tried sql and || to merge but it didn't work.
proc sql;
create table want as
select id, copd, mi,stroke,cancer, summary as copd||mi
from webwork.import
group by id;
quit;
proc print data=webwork.import;
a={copd mi};
b={stroke};
c=a||b;
print c;