Statalist


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

st: List long table


From   "Ronnie Babigumira" <rb.glists@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: List long table
Date   Tue, 20 May 2008 13:28:04 +0700

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/



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