Statalist


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

Re: st: RE: -foreach-, local macro, -split- command


From   David Torres <[email protected]>
To   [email protected]
Subject   Re: st: RE: -foreach-, local macro, -split- command
Date   Tue, 08 Sep 2009 18:39:11 -0400

Thanks, Martin,

-foreach- is not a problem, however. I can certainly display the strings as you show in your example. What I need to do, on the other hand, is get each string into a single variable of its own, but attached to the id of the person to which it refers. Doing this will allow for the creation of panel data, which can be reshaped long and worked on.

Right now, I can get some of the strings into a single variable using the replace in my foreach command code. Unfortunately, if there are observations with several words that, when the characters are added, exceed 244 characters, I lose the extra info when I split the variable using the split command.

It would be great if I could get all the information that is displayed with the display command into unshared variables.

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