Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: RE: auto-create dictionary file
From
Nick Cox <[email protected]>
To
"'[email protected]'" <[email protected]>
Subject
st: RE: auto-create dictionary file
Date
Fri, 6 May 2011 19:22:22 +0100
See option -dictionary- of -outfile-.
Nick
[email protected]
Buzz Burhans
I have a large comma delimited text file I need to read into Stata. I need
to do this repeatedly with similarly structured files I previously split out
from a large master file. The subfiles I need to import are nonetheless
large in terms of both number of observations and number of variables. If I
-insheet- the file I get a portion of it and then I run out of memory.
-insheet- does not allow an -in- option, so I can't restrict the amount it
tries to import, and I can't specify the variable types to conserve memory
(use of -compress- after the import decreases the file size tremendously).
I'd like to use -infile- to take advantage of being able to use -in- and
to specify the new variable types.
Is there any way to produce a Stata .dct dictionary file automatically, so
that I could then modify it for use with -infile- or -infix-, instead of
having to create a dictionary from scratch? Using -findit- I found a very
old STB program (STB9) called -creatdct- by Bill Gould which automatically
creates Stata .dct dictionaries. That program seems to have limitations in
terms of file size, and I could not get it to work. It appears that that
program was a precursor to later functionality built into the -insheet- and
-infile- commands, but I am not aware of a way to get a dictionary file
after running those commands.
I'm guessing Stat Transfer would work easily here, but this is not a task I
have to do often enough to justify owning it, so I'd like to come up with an
alternative "manual" method.
*
* 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/