along

0th

Percentile

Helper to create vectors with matching length.

These functions take the idea of seq_along() and generalise it to creating lists (list_along) and repeating values (rep_along).

Keywords
internal
Usage
list_along(x)

rep_along(x, y)

Arguments
x

A vector.

y

Values to repeat.

Value

A vector of the same length as x.

Aliases
  • along
  • list_along
  • rep_along
Examples
# NOT RUN {
x <- 1:5
rep_along(x, 1:2)
rep_along(x, 1)
list_along(x)
# }
Documentation reproduced from package purrr, version 0.2.5, License: GPL-3 | file LICENSE

Community examples

Looks like there are no examples yet.