Statalist The Stata Listserver


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

st: RE: RE: RE: Macro display format


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: RE: RE: Macro display format
Date   Wed, 22 Mar 2006 23:09:59 -0000

It's a good question. 

I guess: 
 
	-scatter- calls -graph- calls ... something that 
	clears your r-class results. 

	-graph- needs all sorts of little calculations to work 
	out what to show. It tends to do this on the fly, but 
	either way, you can lose your r-class results. 

Whatever it is, it is quite deep down. 

Nick 
[email protected] 

Alex Ogan

> Sorry if this is a silly question.  
> 
> I did the following sequence of commands.  I closed the 
> scatter as soon
> as it opened.  No other commands.  
> 
> Why does r(mean) go away after you use it in the scatter with the
> formatting extended function?
> 
> . sysuse auto, clear
> (1978 Automobile Data)
> 
> . quietly summ length
> 
> . di `r(mean)'
> 187.93243
> 
> .  di `: di %9.1f `r(mean)''
> 187.9
> 
> .  di `: di %9.1f `r(mean)''
> 187.9
> 
> . twoway scatter length mpg, text(200 35 "The mean of length is:`: di
> %2.1f `r(mean)''")
> 
> .  di `: di %9.1f `r(mean)''
> 
> 
> . di `r(mean)'
> 
> 
> .
> 

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