[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: RE: Macro display format
Thomas Speidel writes:
> Thank you Nick & Nick,
> Nick W., I tried using your syntax, but I'm having some problems:
> . sysuse auto, clear
> (1978 Automobile Data)
> . qui summ length
> . local mymean = `r(mean)'
> . twoway scatter length mpg, text(200 35 "Mean is `: %2.1f `mymean''")
> % not allowed
> . di `mymean'
> I also tried using the rclass r(mean), instead of assigning it to a
> local macro, but to no avail. Does the colon need to stay inside the
> compound quote?
You are missing part of the extended macro command... Try:
sysuse auto, clear
qui summ length
local mymean = `r(mean)'
twoway scatter length mpg, text(200 35 "Mean is `:di %5.1f `mymean''")
CONFIDENTIALITY NOTE: This e-mail message, including any
attachment(s), contains information that may be confidential,
protected by the attorney-client or other legal privileges, and/or
proprietary non-public information. If you are not an intended
recipient of this message or an authorized assistant to an intended
recipient, please notify the sender by replying to this message and
then delete it from your system. Use, dissemination, distribution,
or reproduction of this message and/or any of its attachments (if
any) by unintended recipients is not authorized and may be
* For searches and help try: