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
Meta proportionHi to everybody... after running the "metaprop" command if it is possible to write instead of "ES" "…
LoopHello fellow Stata users, I have a question regarding the forvalues loop, this is the first time I …
Regression of a few selected observationsI have a set of data but would only require to use of a few observations from the entire dataset. I …
Trouble working with %tc datesHello, I have a variable "EndDate" whose format is double yet displays as if it was %tc. I need to …
Help creating a bar graph over multiple variablesGreetings, When creating a graph bar and dividing it over a variable, I cant figure out a way to add…
Subscribe to:
Post Comments (Atom)
0 Response to Removing duplicate words from a string variable
Post a Comment