Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: List long table


From   "Martin Weiss" <martin.weiss@uni-tuebingen.de>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: List long table
Date   Tue, 20 May 2008 09:24:15 +0200

Note that the official command -list- does have a -header(#)- option which
allows repetition of header information at any interval.

Martin Weiss
_________________________________________________________________

Diplom-Kaufmann Martin Weiss
Mohlstrasse 36
Room 415
72074 Tuebingen
Germany

Fon: 0049-7071-2978184

Home: http://www.wiwi.uni-tuebingen.de/cms/index.php?id=1130

Publications: http://www.wiwi.uni-tuebingen.de/cms/index.php?id=1131

SSRN: http://papers.ssrn.com/sol3/cf_dev/AbsByAuth.cfm?per_id=669945

-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Ronnie Babigumira
Sent: Tuesday, May 20, 2008 8:28 AM
To: statalist@hsphsun2.harvard.edu
Subject: st: List long table

Dear list
I have an idea for a small "program" but have no idea where to even start.

I am doing some data cleaning which primarily lists suspect cases.
Some of the tables are long and span multiple pages. I want to be able
to repeat the header (variable names) on the next page. Since I am
mainly inserting the log files into an MS Word document, I know that
17 rows would fit nicely on a landscape A4 page.

So, how do I
1. List a maximum of 17 rows per page
2. Continue the listing on the next page carrying over the header
information
3. (as a bonus, I would like to add a line -continued- if the table is
spanning. This is not necessary but would be a useful addition)

See illustration below

In essence, this would be the Stata version of the LaTeX longtable package.

Ronnie

   +---------------------------------------------------+
   | villcode | land_v_cat | land_v_total | landtotcal |
   |----------+------------+--------------+------------|
   |        5 |          7 |            . |       12.5 |
   |----------+------------+--------------+------------|
   |        5 |          8 |         12.5 |          0 |
   |----------+------------+--------------+------------|
   |        5 |         14 |         32.5 |          0 |
   |----------+------------+--------------+------------|
   |       24 |          1 |          1.5 |       1.47 |
   |----------+------------+--------------+------------|
   			.	
   			.
   			17 rows
		   --- cont ---
   +---------------------------------------------------+
   | villcode | land_v_cat | land_v_total | landtotcal |
   |----------+------------+--------------+------------|
   |       30 |          7 |          .12 |          0 |
   |----------+------------+--------------+------------|
   |       30 |         11 |        27.93 |          0 |
   |----------+------------+--------------+------------|
   |       30 |         14 |        91.75 |          0 |
   |----------+------------+--------------+------------|
   |       31 |          4 |        26.95 |          0 |
   |----------+------------+--------------+------------|
*
*   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/



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index