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

Re: st: Listtex: headlines and append


From   Roger Newson <[email protected]>
To   [email protected]
Subject   Re: st: Listtex: headlines and append
Date   Sun, 09 Oct 2005 17:37:57 +0100

At 07:40 08/10/2005, Herve wrote:
Dear All:

I have two questions concerning -listtex- (downloadable from ssc).

I want to export two variations of a list of countries.

Question 1: Headlines

With the following command, I would like to get a column title: "sample39_absence" above the first list of countries.

listtex name using table_countries if sample39_absence==1, rstyle(tabdelim) headlines("sample39_absence") replace

I get the countries but no title.

Question 2: Append

I would like to append the second list of countries below the first one. I use the following command:

listtex name using table_countries if sample32_absence==1, rstyle(tabdelim) headlines("sample32_absence") appendto(table_countries)

I get the following error message:

file table_countries.raw already exists
Thanks to Herve to alerting me about this bug in -listtex-. This bug is activated when the user specifies a -using- file or an -appendto()- file without an extension, and can be fixed by specifying a -using- or -appendto()- file with an extension, as in

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

or

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

Adding a filename extension is an immediate fix. The reason for this bug is that -listtex- uses both -outfile- and -file-. Given a filename without an extension, -file- assumes a file without an extension, and -outfile- adds the extension .raw, as in table_countries.raw. I am currently working on a long term policy for -listtex- regarding filenames without extensions.

I hope this helps. (Let me know if it doesn't.)

Best wishes

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: [email protected]
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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index