% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/00_S7_classes.R
\name{class_vecvec}
\alias{class_vecvec}
\title{S7 class for vecvec}
\usage{
class_vecvec(x = list(), i = seq_len(sum(lengths(x))))
}
\arguments{
\item{x}{An unnamed list of arbitrary vectors. The vectors can be of
different types and lengths, but they must all be vectors (according to
\link[vctrs:vec_is]{vctrs::vec_is}). Adjacent vectors of the same type will be combined
together into a single vector.}

\item{i}{A vector of integers specifying the location of each element in \code{x}
as if they were combined in order. The values in \code{i} must be between 1 and
the total number of elements across all vectors in \code{x}, and can contain
duplicates. If not provided, it defaults to a sequence from 1 to the total
number of elements across all vectors in \code{x}.}
}
\value{
A vector of vectors of S7 object of class \code{class_vecvec}.
}
\description{
\code{class_vecvec()} constructs a new vecvec object from a list of vectors. It is
designed to be performant with minimal checks on the inputs. Direct use of
\code{class_vecvec()} is useful for developers, but for users it is recommended to
use \code{\link[=vecvec]{vecvec()}} to create vecvec objects.
}
\examples{
# Create a vecvec prototype
class_vecvec()

# Construct a vecvec from a list of vectors
class_vecvec(list(letters, rnorm(10)))

# Fully specify a vecvec with locations
class_vecvec(
  x = list(letters, rnorm(10)),
  i = c(1:3, 27:31, 26:4, 32:36)
)

}
