Statalist The Stata Listserver


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

st: why not %#.#p format?


From   Jeph Herrin <junk@spandrel.net>
To   statalist@hsphsun2.harvard.edu
Subject   st: why not %#.#p format?
Date   Thu, 05 Oct 2006 10:55:54 -0400

Statalisters,

Once again I find myself wondering what the logical or other
barriers are to Stata supporting a "percentage" format type.

I often have variables that are percentages, but to display
or graph them I have to create a second variable = pctvar*100
and put a "%" in the display statement. How much more elegant
if I could simply, eg,

 format pctvar %6.1p

and know that this variable will be displayed as 100x the contents
with a trailing "%" (one of the 6 chars of course). It seems like
a fairly modest variation on the %#.#e format; is there some obvious
logical or technical barrier to this? Or maybe there's a trick I
don't know for producing this?

Apologies if this has come up before, I searched the archives with
no luck.

cheers,
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