Statalist


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

st: way to align -tab- columns?


From   Jeph Herrin <junk@spandrel.net>
To   statalist@hsphsun2.harvard.edu
Subject   st: way to align -tab- columns?
Date   Tue, 01 Apr 2008 11:11:36 -0400

I need to tabulate a large number of variables -

  qui {
	foreach V of varlist _all {
		noi tab `V', m
  	}
  }

for distribution to others.

The problem is that, logging the output as SMCL, the
tables are not aligned - they stagger back and forth
across the page according to the length of the labels
on the values:


      yhf_renal |      Freq.     Percent        Cum.
----------------+-----------------------------------
           Mild |        140       16.36       16.36
Moderate/Severe |         75        8.76       25.12
              . |        641       74.88      100.00
----------------+-----------------------------------
          Total |        856      100.00


yhf_ondialy |
        sis |      Freq.     Percent        Cum.
------------+-----------------------------------
        Yes |          3        0.35        0.35
          . |        853       99.65      100.00
------------+-----------------------------------
      Total |        856      100.00


etc.

It would be ever so much cleaner if I could have a fixed
width for the left column of labels, because with 30 pages
of this it is, well, staggering. Any ideas? -table-
lets me align things, but it won't give me the running
percentages in each table.

thanks,
Jeph

*
*   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