powered by
These functions take the idea of seq_along() and generalise it to creating lists (list_along) and repeating values (rep_along).
seq_along()
list_along
rep_along
list_along(x)rep_along(x, y)
rep_along(x, y)
A vector.
Values to repeat.
An vectors the same length as .x.
.x
# NOT RUN { x <- 1:5 rep_along(x, 1:2) rep_along(x, 1) list_along(x) # }
Run the code above in your browser using DataLab