Dear Colleagues,
I have found myself in a situation where I would like to produce a line of text based on a list.
An example of relevant data would be as follows,
where,
'pracid' is the GP/Primary care practice identifier;
and 'everhad' is the variable to indicate if the practice ever recorded a patient record of interest.
From the example above, I would like the result to be
"1, 2, 4, 7, 9"
I have tried searching for existing answers in this forum but have not been successful so far. Apologies if such an answer already exists, and if this is a very simple question.
I would be grateful for any help and guidance.
Thank you in advance for your time and kind help.
Regards,
Kareem
I have found myself in a situation where I would like to produce a line of text based on a list.
An example of relevant data would be as follows,
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input float(pracid everhad) 1 1 2 1 4 1 7 1 9 1 end
'pracid' is the GP/Primary care practice identifier;
and 'everhad' is the variable to indicate if the practice ever recorded a patient record of interest.
From the example above, I would like the result to be
"1, 2, 4, 7, 9"
I have tried searching for existing answers in this forum but have not been successful so far. Apologies if such an answer already exists, and if this is a very simple question.
I would be grateful for any help and guidance.
Thank you in advance for your time and kind help.
Regards,
Kareem
Comment