I have a string variable that contains drug names. I've cleaned these names and split each drug into its own string variable:
Some of the rows are identical but the drugs are in different orders. I'm looking for a way of concatenating these separated strings such that the drugs on each row are ordered alphabetically.
Any idea?
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input str20(drug1 drug2) "CISPLATIN" "VINCRISTINE" "VINCRISTINE" "CISPLATIN" "VINCRISTINE" "AFATINIB" end
Any idea?
Comment