Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AW: st: RE: RE: RE: Undocumented limitation of describe (and hence -ds-) in Stata 10?


From   "Martin Weiss" <[email protected]>
To   <[email protected]>
Subject   AW: st: RE: RE: RE: Undocumented limitation of describe (and hence -ds-) in Stata 10?
Date   Wed, 7 Apr 2010 12:54:14 +0200

<> 



The one that I gave in
http://www.stata.com/statalist/archive/2010-04/msg00269.html last night, for
instance:

***
sysuse auto, clear
su mpg
di r(mean)
di `r(mean)'
di "`r(mean)'"
***


HTH
Martin


-----Ursprüngliche Nachricht-----
Von: [email protected]
[mailto:[email protected]] Im Auftrag von Nick Cox
Gesendet: Mittwoch, 7. April 2010 12:05
An: [email protected]
Betreff: RE: st: RE: RE: RE: Undocumented limitation of describe (and hence
-ds-) in Stata 10?

What examples do you have in mind? 

Nick 
[email protected] 

Martin Weiss

The confusion is compounded by -display-'s uncanny ability to somehow
circumvent the requirement for single quotes: As it takes an
-expression-,
it knows beforehand it needs to evaluate. Many users take its behavior
as
representative of the rest of Stata, I think...

Nick Cox

I think of ` ' as meaning "evaluate this here and now". Here should be
obvious, but the now is important too, meaning precisely "before you try
to execute this command line". 

`macname' is the canonical example for local macro macname. But

`= 2 + 2' 

`c(date)'

`r(varlist)' 

`e(cmdline)' 

`: value label foreign' 

are other examples in which you also want literal text substituted. I
don't know if this is ever official wording -- indeed I doubt it -- but
I think of examples other than the first as invoking the local macro
persona of beasts that are not local macros in the most restricted sense
but can behave similarly given persuasive syntax. 

Nick 
[email protected] 

Michael I. Lichter

I understand that single quotes are not simply local macro dereference 
operators, but it certainly looks like that's their function in the 
command line. Other than local macro, what can you dereference in this
way?


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index