Statalist


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

st: importing LONG string variables


From   "Mindruta, Denisa Constanta" <[email protected]>
To   [email protected]
Subject   st: importing LONG string variables
Date   Thu, 23 Aug 2007 16:50:30 -0500 (CDT)

Greetings!
I would appreciate any help on the following problem: I need to import a (.cvs) file containing several string variables that go well beyond stata limits. Is there a way to import the file, and at the same time, parse these string variables in constituent words (delimited by “|”) before saving it as a stata file ?

A simple example might help: 
Row1
Name1|Name2 comma Address1|Address2 comma PatClass1|PatClass2|PatClass3
Row 2
Name3|Name4|Name5 comma Address3|Address4|Address5 comma PatClass4

Want to get the following structure:
Row1
Name1 comma Name2 comma “missing info” comma Address1 comma Address2 comma “missing info” comma PatClass1 comma PatClass2 comma PatClass3
Row 2
Name3 comma Name4 comma Name5 comma Address3 comma Address4 comma Address5 comma PatClass4 comma “missing info” comma “missing info”

Any suggestion on how to approach this problem? (here is just a simpe example, the text in a cell could go up to 200 words of 30 characters each, and I have 15 of these variables, and 600 files...)Thanks !

Denisa
University of Illinois Urbana-Champaign

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