Learn R Programming

vctrs (version 0.6.5)

vec_init: Initialize a vector

Description

Initialize a vector

Usage

vec_init(x, n = 1L)

Arguments

x

Template of vector to initialize.

n

Desired size of result.

Dependencies

  • vec_slice()

Examples

Run this code
vec_init(1:10, 3)
vec_init(Sys.Date(), 5)
vec_init(mtcars, 2)

Run the code above in your browser using DataLab