Statalist The Stata Listserver

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

Re: st: Macro display format

From   Nick Winter <>
Subject   Re: st: Macro display format
Date   Thu, 23 Mar 2006 10:48:44 -0500


Should have been

   ... `: di %2.1f `mymean'' ...

--Nick W.

At 10:38 AM 3/23/2006, you wrote:
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?


PS Using Stata 9.1 on Win XP

This e-mail and any attachments may contain confidential and
privileged information. If you are not the intended recipient,
please notify the sender immediately by return e-mail, delete this
e-mail and destroy any copies. Any dissemination or use of this
information by a person other than the intended recipient is
unauthorized and may be illegal.

*   For searches and help try:
Nicholas J. G. Winter 607.255.8819 t
Assistant Professor 607.255.4530 f
Department of Government e
Cornell University w
308 White Hall
Ithaca, NY 14853-4601

* For searches and help try:

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