Statalist


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

Re: st: combining many data files


From   Steven Dubnoff <[email protected]>
To   [email protected]
Subject   Re: st: combining many data files
Date   Wed, 19 Nov 2008 20:14:46 -0800


I am wondering if there's a straightforward way to append a large
number of .dta files into one file..


If you have Stat/Transfer this is trivial:

        combine *.dta big.dta

A very nice thing about this command is that it will match up the variables if necessary. You can also specify a "reference" input file that contains all of your variables in the order you want. Optionally, the file names can be made into an additional variable in the output file. The combine command will work for any input or output file type supported by Stat/Transfer.

Best,

Steve



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