Various people have provided technical solutions to your problem.

May I suggest, though, that 'splice' isn't quite the right word for this
operation?  Splicing two pieces of rope / movie film / audio tape / wires /
etc. means connecting them at their ends, either at an extremity or in the
middle, e.g.

            X:  xxxxxxxxxxxxxxxx
            Y:  yyyyyyyyyyyyyyyy
            Extremity splice: xxxxxxxxxxxxxxyyyyyyyyyyyy  or
yyyyyyyyyyyyyyxxxxxxxxxx
            Middle splice: xxxxxxxyyyyyyyyyyyyyyyxxxxxxxxx or
yyyyyyyxxxxxxxxxxxxxxxyyyyyyyy

The splice itself is the point of connection (xy or yx) between two things.

In normal English, splicing never refers to interspersing alternate members
of X and Y.

This may seem like a minor point, but I think it is worthwhile using
descriptive names for functions.

             -s


On Tue, Jun 9, 2009 at 5:12 AM, Titus von der Malsburg
<malsburg@gmail.com>wrote:

> An operation that I often need is splicing two vectors:
>
>  > splice(1:3, 4:6)
>  [1] 1 4 2 5 3 6
>

	[[alternative HTML version deleted]]


