intermingle2vec | R Documentation |
Combine 2 vectors (of the same length) so that form every odd and every even element of a unified vector.
intermingle2vec(V1, V2, wNames = TRUE, name_prefix = NULL)
V1 |
A vector. |
V2 |
A vector. |
wNames |
Logical. Whether to include the names of the vectors in the output vector. |
name_prefix |
A character vector of length 2. If provided, the names of the vectors will
be prefixed with the corresponding element of |
A vector that combines V1
and V2
, with the elements of V1
alternating with the elements of V2
.
V1 <- c(1, 3, 5)
V2 <- c(2, 4, 6)
intermingle2vec(V1, V2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.