% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/slice.R
\name{vec_init}
\alias{vec_init}
\title{Initialize a vector}
\usage{
vec_init(x, n = 1L)
}
\arguments{
\item{x}{Template of vector to initialize.}

\item{n}{Desired size of result.}
}
\description{
Initialize a vector
}
\section{Dependencies}{

\itemize{
\item vec_slice()
}
}

\examples{
vec_init(1:10, 3)
vec_init(Sys.Date(), 5)

# The "missing" value for a data frame is a row that is entirely missing
vec_init(mtcars, 2)

# The "missing" value for a list is `NULL`
vec_init(list(), 3)
}
