Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: RE: AW: SV: AW: range of a stringvariable


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: AW: SV: AW: range of a stringvariable
Date   Wed, 28 Apr 2010 17:14:43 +0100

Absolutely correct. In writing -split- I thought about extending it to
splitting  string variables that are not separated somehow. But it would
have complicated the syntax and explanation mightily, and already users
could get directly what they want by applying -substr()-. 

Nick 
n.j.cox@durham.ac.uk 

Martin Weiss


" Out of curiosity what happens with the A in 543A in the statement
below?

split remainder, parse(A)"


The -parse()- character is zapped, unfortunately. That is usually what
-split- users want. Of course you can always separate the string with
-substr()-, as shown earlier.

Tomas Lind

Thanks Martin for your kind help. 

Out of curiosity what happens with the A in 543A in the statement below?

split remainder, parse(A)

I thought that the statement above meant that I should get 2 variables
ICD-10, with and without the A. However I just get one new variable,
remainder1 (which is the ICD-10 numbers without the trailing A, enough
for
the code to work).

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   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   |   Site index