intercalate | R Documentation |
Intercalate list values into a vector
intercalate(...)
... |
parameters are expected as multiple vectors. |
This function takes a list of vectors, and intercalates them by inserting alternating values from each vector to make one combined vector. It is analogous to shuffling a deck of cards, except that there could be more than two stacks of cards shuffled together.
vector of values derived from each input list ...
, with
one element per list in order. In the event any list is shorter than
the others, its values are recycled so each list is equal length.
Other jam list functions:
list2im()
A <- LETTERS[1:10];
B <- letters[1:10];
intercalate(A, B)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.