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

Re: st: RE: Macro problem.


From   [email protected]
To   [email protected]
Subject   Re: st: RE: Macro problem.
Date   Tue, 7 Sep 2004 14:31:43 -0400

Sometimes, the structure of my programming requires
global instead of local.
Best regards.



                                                                                                                                               
                      "Nick Cox"                                                                                                               
                      <[email protected]>           To:       <[email protected]>                                              
                      Sent by:                         cc:                                                                                     
                      owner-statalist@hsphsun2.        Subject:  st: RE: Macro problem.                                                        
                      harvard.edu                                                                                                              
                                                                                                                                               
                                                                                                                                               
                      09/07/2004 02:24 PM                                                                                                      
                      Please respond to                                                                                                        
                      statalist                                                                                                                
                                                                                                                                               
                                                                                                                                               
                                                                                                                                               
                                                                                                                                               




See help on macrolists for `: list uniq'.

I know you work at the World Bank, but
I think the trend to keep these things
in locals, not globals. Different point,
however.



Nick
[email protected]

[email protected]

> I have the following macro problem.
> In my macro, some variable are repeated
> twice or more, and when trying to reshape, I can't.
> It looks like:
>
> global myvars " v1 v2 v3 v4 v5 v1 v6 v4 ......v7 v3"
>
> So, I have to make sure that I have the variable only
> one time. But sometime, I have hundreds of variables
> when reshaping large datasets. And I can't figure
> visually which are reapeated.
> How to eliminate the doubles?

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




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