Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Tokenize question


From   Molly Lipscomb <Molly.Lipscomb@Colorado.EDU>
To   statalist@hsphsun2.harvard.edu
Subject   st: Tokenize question
Date   Tue, 5 Feb 2008 09:36:40 -0700 (MST)

Hello,

I'm trying to separate columns in a file which had multiple delimiters--they used , _ . and dashes as delimiters.  Insheet's delimit option only seems to allow me to specify one delimiter, so I was trying to separate the columns using string commands, but several of the variables have different lengths, so string commands don't seem to be a feasible option.  Tokenize seems to be the command to use here, but I must be misusing the command.   
My variable, name, has observations that look like:
12860000 - 2316_97_1303601_1302108.71.Yes.3459.
13410000 - 590_05_1200500_1300706.136.No.3059.
etc.
I would like to separate this into 8 different columns.
I tried many variations on the tokenize command, but I'm having no luck.  
Is there an easier way to do this?
Thanks so much for any advice you may have.
Best,
Molly

*
*   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