Statalist The Stata Listserver

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

st: why not %#.#p format?

From   Jeph Herrin <>
Subject   st: why not %#.#p format?
Date   Thu, 05 Oct 2006 10:55:54 -0400


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.


*   For searches and help try:

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