Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


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

Re: st: AW: import string variables


From   Tyler Frazier <tyfrazier@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: AW: import string variables
Date   Fri, 28 May 2010 17:35:38 +0200

I found a trick, just put a character at the beginning of each column
in the first observation and then delete it afterwards

On Fri, May 28, 2010 at 5:33 PM, Tyler Frazier <tyfrazier@gmail.com> wrote:
> but is this reliable? wouldnt there be some chance of error
>
> On Fri, May 28, 2010 at 5:29 PM, Martin Weiss <martin.weiss1@gmx.de> wrote:
>>
>> <>
>>
>> You can always -tostring- once they have been imported into Stata.
>> -tostring- also takes a -format()- option if you want the leading null.
>>
>>
>>
>> HTH
>> Martin
>>
>>
>> -----Ursprüngliche Nachricht-----
>> Von: owner-statalist@hsphsun2.harvard.edu
>> [mailto:owner-statalist@hsphsun2.harvard.edu] Im Auftrag von Tyler Frazier
>> Gesendet: Freitag, 28. Mai 2010 17:15
>> An: statalist@hsphsun2.harvard.edu
>> Betreff: st: import string variables
>>
>> I am having a terrible time to import string variables to Stata -- I
>> have tried every which way that seems possible -- txt, excel, access,
>> but none of them seem to work. they all convert the numbers to text.
>>
>> the variables are in this format 02   050   005   010   etc etc
>>
>> any suggestions?
>>
>> thanks,
>> Ty
>> *
>> *   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/
>>
>>
>> *
>> *   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/
>>
>

*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index