[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: RE: RE: import data
Nick Cox replied to Hans J. Baumgartner
> Yes. I guess there are several ways to do this.
> Here are two.
> You could just specify that you have various
> -str1- variables in the columns containing the
> semicolons and then -drop- those within Stata.
> However, what I would do with your example is
> . infix str whatever 1-80 using mydata.dat
> . split whatever, p(;) destring
> . renvars whatever? \ id place d1-d4
> That is,
> 1. read in the data as one string variable
> 2. use -split- from SSC to split on the semi-colons.
> 3. use -renvars- from STB-60 to clean up variable
Ben Kriechel's solution is better.
Note that the feature he recommends
was added to Stata 7 on 8 August 2001.
* For searches and help try: