Keywords:
### ** Examples x <- 0:5 rep_along(x, 1:2)
[1] 1 2 1 2 1 2
rep_along(x, 1)
[1] 1 1 1 1 1 1
# Create fresh vectors by repeating missing values: rep_along(x, na_int)
[1] NA NA NA NA NA NA
rep_along(x, na_chr)
[1] NA NA NA NA NA NA
# rep_named() repeats a value along a names vectors rep_named(c("foo", "bar"), list(letters))
$foo [1] "a" "b" "c" "d" "e" "f" "g" "h" "i" "j" "k" "l" "m" "n" "o" "p" "q" "r" "s" [20] "t" "u" "v" "w" "x" "y" "z" $bar [1] "a" "b" "c" "d" "e" "f" "g" "h" "i" "j" "k" "l" "m" "n" "o" "p" "q" "r" "s" [20] "t" "u" "v" "w" "x" "y" "z"