local append replace
local first 1
foreach ... {
outreg ..., `append'
if `first++'==1 local append append
}
(not tested)
Drop the first line if -replace- is not needed.
Cheers, ben
> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]] On Behalf Of
> Kim Lyngby Mikkelsen (KLM)
> Sent: Wednesday, June 09, 2004 1:46 PM
> To: [email protected]
> Subject: st: 'outreg' in a 'foreach' - loop
>
>
> Dear statalist
>
> I wont to use 'outreg' in a 'foreach'-loop, but to do that I
> need 'outreg' to ignore the "append"-option the first time it
> is called, as the output file does not yet exist.
>
> How do I make 'outreg' to do that, or is there another way to
> come around this problem?
>
> Regards
> Kim
>
>
> _________________________________________________________
> Kim Lyngby Mikkelsen, seniorforsker
> Arbejdsmilj�instituttet
> Lers� Parkall� 105
> DK-2100 K�benhavn �
> Telf.: 391 27274
>
> *
> * 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/
>
*
* 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/