combineAlternatingly: Combine Two Vectors Alternatingly

View source: R/vector.R

combineAlternatinglyR Documentation

Combine Two Vectors Alternatingly

Description

Combine Two Vectors Alternatingly

Usage

combineAlternatingly(a, b)

Arguments

a

first vector

b

second vector

Value

vector x with all x[c(1, 3, 5, ...)] == a and all x[c(2, 4, 6, ...)] == b

Examples

a <- paste0("a", 1:5)
b <- paste0("b", 1:5)

combineAlternatingly(a, b)
combineAlternatingly(b, a)

combineAlternatingly(list(a = 1, b = 2), list(c = 3, d = 4))


KWB-R/kwb.utils documentation built on April 1, 2024, 7:12 a.m.