Statalist


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

st: RE: text to columns


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: text to columns
Date   Tue, 17 Nov 2009 20:35:34 -0000

Use -split- with punctuation _ and -. 

-split- was added in Stata 8. 

I am sure that you will enjoy telling your colleague. 

Nick 
[email protected] 

Keith Dear

Is there a utility to turn a string variable with values like 
"rs1805005_chr16_88513145-88513"
into four variables (or whatever it takes) rs1805005, chr16, 88513145, 
88513 ?
A colleague tells me "Excel is easy using Text to columns and following 
the prompts, but it irritates me not to be able to do it in Stata!"
(btw I consider it a minor personal victory that the people I work with,

some of them, sometimes, no longer write STATA.)

*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index