Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

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

Re: st: combining local macros

From   Nick Cox <>
Subject   Re: st: combining local macros
Date   Mon, 11 Apr 2011 12:58:48 +0100

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.


On Mon, Apr 11, 2011 at 12:47 PM,  <> 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:

© Copyright 1996–2016 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index