Statalist


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

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


From   "[email protected]" <[email protected]>
To   "[email protected]" <[email protected]>
Subject   Re: st: -infile using- variables in rows?
Date   Mon, 2 Jun 2008 07:36:08 -0700

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
[email protected]

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/

Privileged, confidential or patient identifiable information may be contained in this message. This information is meant only for the use of the intended recipients. If you are not the intended recipient, or if the message has been addressed to you in error, do not read, disclose, reproduce, distribute, disseminate or otherwise use this transmission. Instead, please notify the sender by reply e-mail, and then destroy all copies of the message and any attachments.

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