Statalist The Stata Listserver


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

Re: st: Macro display format


From   Nick Winter <nw53@cornell.edu>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Macro display format
Date   Thu, 23 Mar 2006 10:48:44 -0500

Oops.

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'
187.93243

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?

Thanks,
Thomas

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:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/
________________________________________________________
Nicholas J. G. Winter 607.255.8819 t
Assistant Professor 607.255.4530 f
Department of Government nw53@cornell.edu e
Cornell University falcon.arts.cornell.edu/nw53 w
308 White Hall
Ithaca, NY 14853-4601

*
* 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–2020 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index