I have a variable with a row of ICD codes. Some of them are repeated
One registration looks like this "I120 N185 I509 D649 J159 A402 K658 I109 J960 N185 I509 I109 R104X I120 I509 N185"
There are duplicates of I120, N185 and I159. How can I remove them?
I tried this https://stackoverflow.com/questions/...he-same-string but it seems it only remove duplicates when they follow one after the other.
Related Posts with Removing duplicate words from a string variable
Help with basic data managementDear all in Statalist, I need general codes for management of my data that can be used for other st…
how to get the coefficient of interation term after regression Code: xtset area_id year xtreg y i.dummy##c.GDP income xoijj i,year, fe r After running this r…
Propensity score matching/weighting - panel dataHi everyone! Because I am lacking parallel trends, I have decided to study the effect of X on Y usi…
Dynamic number of ticks with valuelabels in twoway graph?I have to update this figure each month and I then have to manually change 1(1)19 to 1(1)20 ond so o…
Count frequency of namesDear All, Suppose that I have this dataset, Code: * Example generated by -dataex-. To install: ssc…
Subscribe to:
Post Comments (Atom)
0 Response to Removing duplicate words from a string variable
Post a Comment