% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils.R
\name{fixed_length}
\alias{fixed_length}
\title{Fixed Length Vector}
\usage{
fixed_length(x, len, fill_with = NULL)
}
\arguments{
\item{x}{A vector.}

\item{len}{Desired length.}

\item{fill_with}{Element used to extend the vector length.
If set to \code{NULL}, extend by itself (default: NULL).}
}
\value{
A vector
}
\description{
Create a desired length of vector by trimming/extending the \code{x} vector.
}
\examples{
# Extend `x` to fulfill the `len` requirement
fixed_length(1:5, 7)
# Trim `x` to fulfill the `len` requirement
fixed_length(1:5, 3)
}
