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

st: Re: Rép. : Re: st: Listtex: headlines a nd append


From   Roger Newson <roger.newson@kcl.ac.uk>
To   statalist@hsphsun2.harvard.edu
Subject   st: Re: Rép. : Re: st: Listtex: headlines a nd append
Date   Mon, 10 Oct 2005 14:45:24 +0100

At 13:53 10/10/2005, Herve wrote:
Dear Roger:

Thank you for your detailed reply. Unfortunately, it does not work. Here are my command lines:

listtex name using table_countries.txt if sample39_absence==1, rstyle(tabdelim) replace

listtex name using table_countries.txt if sample32_absence==1, rstyle(tabdelim) appendto(table_countries.txt)

I get the following error message:

file table_countries.txt already exists

I must do something wrong somewhere.
What you are probably doing wrong is putting the same filename as the -using- file and the -appendto()- option. Assuming that you want to create a file -table_countries.txt- and then append to it, you should type


listtex name using table_countries.txt if sample39_absence==1, rstyle(tabdelim) replace
listtex name if sample32_absence==1, rstyle(tabdelim) appendto(table_countries.txt)


The -using- file, if it already exists is overwritten (not appended to) if -replace- is specified, and otherwise causes the error message that you got.

I hope this helps.

Roger


--
Roger Newson
Lecturer in Medical Statistics
Department of Public Health Sciences
Division of Asthma, Allergy and Lung Biology
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: roger.newson@kcl.ac.uk
Website: http://phs.kcl.ac.uk/rogernewson/

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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index