vector-along

0th

Percentile

Create vectors matching the length of a given vector

These functions take the idea of seq_along() and generalise it to creating lists (list_along) and repeating values (rep_along). Except for list_along() and raw_along(), the empty vectors are filled with typed missing values.

Usage
lgl_along(.x)

int_along(.x)

dbl_along(.x)

chr_along(.x)

cpl_along(.x)

raw_along(.x)

bytes_along(.x)

list_along(.x)

rep_along(.x, .y)

Arguments
.x

A vector.

.y

Values to repeat.

See Also

vector-len

Aliases
  • vector-along
  • lgl_along
  • int_along
  • dbl_along
  • chr_along
  • cpl_along
  • raw_along
  • bytes_along
  • list_along
  • rep_along
Examples
# NOT RUN {
x <- 0:5
rep_along(x, 1:2)
rep_along(x, 1)
list_along(x)
# }
Documentation reproduced from package rlang, version 0.1.6, License: GPL-3

Community examples

Looks like there are no examples yet.