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

Re: st: importing LONG string variables

From   "Friedrich Huebler" <>
Subject   Re: st: importing LONG string variables
Date   Fri, 24 Aug 2007 15:38:18 -0400

Sergiy Radyakin <> wrote:
> The idea with replacing separators in a text editor is good, but might
> be quite difficult for 600 files that Denisa has. It can be automated
> of course, say with a macro in Word, but why not to write the whole
> conversion in another programming environment?

A good text editor (see "Some notes on text editors for Stata users", or a program like
Windows Grep can process many files in one go without the need for
macros or additional programming.

Mindruta, Denisa Constanta <> wrote:
> Friedrich, you got right to the point: but, unfortunately, with the
> method that you suggested I won't be able to align the information
> properly. Is there any way of telling Stata to leave a blank on V3
> Row1 and move Address1 in V4?

I do not see how this is possible given the format of your original
data. Can you define a rule that identifies which fields should be
left blank? How should Stata distinguish between names and addresses,
for example? Even a human would sometimes have difficulties to know
which string is part of a name and which string part of an address.
Take this line:


Does this mean that the name of the person is Denisa Constanta
Mindruta, living in a street with a missing name? Or is this a person
by the name Denisa Constanta, with the third name missing, living in
Mindruta Street? To be unambiguous, your original data should contain
one of the following lines, with missing values clearly identified by
the delimiters.


*   For searches and help try:

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