Skip to content
Prev 304961 / 398503 Next

How can I improve an ugly, dumb hack

As Linus would say:

AGHHH...!

1. Rui's solution clearly violates my conditions 1) and 2) and so does not work.

2. David's violated my UNSTATED condition 4: The order of the columns
cannot be changed. Any matrix "columns" must be expanded "in place"
between their flanking columns of the data frame. Note that the
solution below changes the column order.

... and I apologize for my continuing -- and embarrassing -- lack of clarity.

However, even so, I take some comfort that David needed to resort to
sapply(...) -- so my original "solution" may not be as dumb as I
thought.

In any case, if anyone wants to bother with this further, please
respond offline, as this has continued here long enough.

Thanks.

-- Bert
On Thu, Sep 6, 2012 at 11:06 AM, David Winsemius <dwinsemius at comcast.net> wrote: