Description Usage Arguments Details Value Author(s) References Examples
Interleave two vectors of arbitrary length.
1 | interleave(x, y)
|
x |
first vector to interleave. |
y |
second vector to interleave. |
x
and y
need not be of the same length nor of the same class.
An interleaved vector.
Antoine Filipovic Pierucci
Original function posted on R-help by Bogdan Romocea.
1 2 3 4 5 6 7 8 9 | # same length
a <- letters[1:5]
b <- letters[10:15]
interleave(a, b)
# different length
x <- letters[1:2]
y <- letters[10:15]
interleave(x, y)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.