vector-len

0th

Percentile

Create vectors matching a given length

These functions construct vectors of given length, with attributes specified via dots. Except for list_len() and bytes_len(), the empty vectors are filled with typed missing values. This is in contrast to the base function base::vector() which creates zero-filled vectors.

Usage
lgl_len(.n)

int_len(.n)

dbl_len(.n)

chr_len(.n)

cpl_len(.n)

raw_len(.n)

bytes_len(.n)

list_len(.n)

Arguments
.n

The vector length.

See Also

vector-along

Aliases
  • vector-len
  • lgl_len
  • int_len
  • dbl_len
  • chr_len
  • cpl_len
  • raw_len
  • bytes_len
  • list_len
Examples
# NOT RUN {
list_len(10)
lgl_len(10)
# }
Documentation reproduced from package rlang, version 0.1.6, License: GPL-3

Community examples

Looks like there are no examples yet.