Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: appending and merging large number of files


From   Roger Newson <[email protected]>
To   [email protected]
Subject   Re: st: appending and merging large number of files
Date   Fri, 16 May 2003 19:26:38 +0100

At 12:59 16/05/03 -0400, Taeho Eom wrote:
Is there any convenient way to merge and/or append large number of
files, say over 100 hundred files, instead of repeated one by one
process?
I myself often do this using the -dsconcat- command, downloadable from SSC. (Type -ssc desc dsconcat- to find out more.)

If you create a macro containing the full list of filenames, for instance a local or global macro -flist-, then you might type

dsconcat `flist'

if the macro is local, or

dsconcat $flist

if the macro is global. And you can also extract subsets of observations and/or variables, as in

dsconcat $flist,subset(parm label estimate min95 max95 p if parm!="_cons")

which selects the variables listed in the -subset- option satisfying the -if- clause in the -subset- option.

I hope this helps.

Roger




--
Roger Newson
Lecturer in Medical Statistics
Department of Public Health Sciences
King's College London
5th Floor, Capital House
42 Weston Street
London SE1 3QD
United Kingdom

Tel: 020 7848 6648 International +44 20 7848 6648
Fax: 020 7848 6620 International +44 20 7848 6620
or 020 7848 6605 International +44 20 7848 6605
Email: [email protected]

Opinions expressed are those of the author, not the institution.

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