Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | Adam Olszewski <adam.olszewski@gmail.com> |
To | statalist@hsphsun2.harvard.edu |
Subject | Re: st: Removing "." (in string format) from a variable |
Date | Wed, 28 Nov 2012 19:35:35 -0500 |
replace yourvariable="" if yourvariable=="." On Wed, Nov 28, 2012 at 7:16 PM, Michael Stewart <michaelstewartresearch@gmail.com> wrote: > hello , > > i am working with ICD9 codes and i had to convert the icd-9 codes to > string format > Unfortunately , I got some values like following with only dots (as > shown below). > |--------------| > | 996.51 | > | . | > | . | > | . | > | 327.23 | > |---------- | > | . | > | . | > | . | > | . | > | . | > |-------------| > | 555.9 | > +----------+ > > As I try to use the icd9 check commnd, I get that the variable has > invalid icd9 values and following output > > . | . Invalid placement of period | > . | . Invalid placement of period | > | . Invalid placement of period | > | . Invalid placement of period | > | . Invalid placement of period | > |----------------------------------------| > > Is there any way to just remove "." (in string format) from the variable. > > > -- > Thank you , > Yours Sincerely, > Mike. > * > * For searches and help try: > * http://www.stata.com/help.cgi?search > * http://www.stata.com/support/faqs/resources/statalist-faq/ > * http://www.ats.ucla.edu/stat/stata/ * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/faqs/resources/statalist-faq/ * http://www.ats.ucla.edu/stat/stata/