Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: RE: Macro question


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   RE: st: RE: Macro question
Date   Tue, 15 Mar 2005 15:53:32 -0000

Neat. 

Nick 
[email protected] 

Nick Winter
 
> Assuming you can be sure that the varlist is tokenized with 
> single spaces, 
> with no leading or trailing spaces (which should be true if it comes 
> through -syntax-, how about:
> 
>   . local varlist : subinstr local varlist `" "' `"", ""' , all
>   . local varlist `""`varlist'""'
> 
> The first step changes each space into ", "
> the second step adds the leading and trailing quotation marks.

*
*   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