Statalist


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

Re: st: -infile using- variables in rows?


From   "Austin Nichols" <austinnichols@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: -infile using- variables in rows?
Date   Sun, 1 Jun 2008 19:55:03 -0400

David Clinton Musselwhite:
The -byvariable- option explained at -help infile1- may be of use.

On Sun, Jun 1, 2008 at 3:24 PM, Ted Anagnoson <anag999@silcom.com> wrote:
> I used Excel's transpose command in these circumstances -with some care, it
> can solve the problem.
>
> It's under Edit / Paste Special - there's a transpose option.  Try
> "transpose" in Excel help for an example and other options.
>
> Ted Anagnoson
>
>
> At 06:13 PM 6/1/2008 +0100, n j cox wrote:
>>
>> I don't know why you expect _row() to work, except that it would be nice
>> if it did. It is not supported syntax.
>>
>> I appreciate that this is an awkward data structure for your purpose. That
>> does not mean that it is an awkward data structure for every purpose.
>>
>> I would try -insheet- followed by -reshape-. I can't see that specifying
>> a dictionary is going to help you here.
>>
>> Nick
>> n.j.cox@durham.ac.uk
>>
>> David Clinton Musselwhite
>>
>> I'm trying to read in a massive amount of files that are dirty in Excel
>> format and don't come out clearly using StatTransfer. I think the best way
>> to approach them is -infile using-, as they're of fixed format and I can
>> specify what to do with them. The only problem is that the variables are
>> rows, not columns. I tried writing a dictionary using _row(#) instead of
>> _column(#), but I keep getting errors (see below) and am wondering why
>> this is invalid. And if so, what on earth can I do to automate the read-in
>> process, as cleaning up each Excel file by hand would take prohibitively
>> long?
>>
>> --snip from data set--
>>                  0-10 employees     10-24 employees     25-99 employees
>> varlabel1  description1  #                  #                   #
>> varlabel2  description2  #                  #                   #
>> --end snip--
>>
>> --attempted dictionary--
>> dictionary using
>> "U:\User10\kis6\Datasets\MEPSIC\MEPSICdata\Alabama1996_II.csv" {
>> _row(6)
>> ( invalid name
>> dictionary invalid
>> r(614);
>> --end attempted dictionary--
>>
>> There are 58 row variables and 7 column cases (each of which is separated
>> by a column...I don't know who designed this format, but I'd like to
>> introduce them to usability).
*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index