R: Create vectors matching a given length

vector-len {rlang} | R Documentation

## Create vectors matching a given length

### Description

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

### Examples

    list_len(10)
    lgl_len(10)

[Package rlang version 0.1.6 Index]