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]
Re: st: combining local macros
From
[email protected]
To
[email protected]
Subject
Re: st: combining local macros
Date
Mon, 11 Apr 2011 14:47:11 +0200
Clear, thank you very much !
Quoting Nick Cox <[email protected]>:
> It's doable. I think you just need to crunch through the possibilities.
>
> foreach y of local b {
> foreach x of local a {
> local xy `xy' `x'`y'
> }
> }
>
> At first sight this may seem like something that should be provided
> explicitly. (If it is, my ignorance or poor memory is revealed.)
> Trouble is, it is easy to think of dozens of such little things that
> -- when you need them -- strike you in the same way. So, better to
> think that a little work with more general tools gets you there
> without too much strain.
>
> Nick
>
> On Mon, Apr 11, 2011 at 12:47 PM, <[email protected]> wrote:
> >
> > Hello,
> >
> > Could someone help me out with the following:
> > suppose you have
> >
> > local a x y z
> > local b 1 2
> >
> > and want to create a new local macro from a and b looking like:
> > x1 y1 z1 x2 y2 z2
> >
> > Is this possible?
> *
> * 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/