Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

[no subject]


From   mark.smith@durham.ac.uk
To   statalist@hsphsun2.harvard.edu
Date   Thu, 29 Sep 2005 17:36:08 +0100

-split- 

(1) splits a string variable into other string variables 

and (optionally)

(2) applies -destring- on the fly. 

But -destring- will only do anything useful to your string variables if they 
are numeric in content, manifestly not the case with Terra's data. So 
-ignore- will not do the job here, and, as Nick Winter pointed out, 
you need to strip unwanted characters before you apply -split-. 

Mark Smith 

Terra Curtis <terra.curtis@cambridgefinance.com> wrote 

Thanks, split seems to do the job.  However now I have some special cases to
deal with.  Say I have a company name like: 
Medical Research, Inc.  

I want to split this into 
Medical 
Research 
Inc
So that the "," and the "." are dropped.  I've tried combining -split- with
the -ignore- option, but it doesn't seem to be doing anything as the comma
and period remain in the split variables.  Anyone know how to take care of
this?


*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index