new_vecvec {vecvec} | R Documentation |
Construct a vector of vectors
Description
new_vecvec() constructs a new vector of vectors from a list of vectors. It is meant to be performant, and does not check the inputs for correctness in any way. It is only safe to use after a call to df_list(), which collects and validates the columns used to construct the data frame.
Usage
new_vecvec(x = list(), loc = NULL, class = character())
Arguments
x |
An unnamed list of arbitrary vectors. |
loc |
A named list of value locations, with |
class |
Name of subclass. |
Value
A vector of vectors of class vecvec
.
Examples
# Create a vecvec prototype
new_vecvec()
# Construct a vecvec from a list of vectors
new_vecvec(list(letters, rnorm(10)))
# Fully specify a vecvec with locations
new_vecvec(
x = list(letters, rnorm(10)),
loc = list(
i = c(rep(1L, 3), rep(2L, 5), rep(1L, 23), rep(2L, 5)),
x = c(1:3, 1:5, 26:4, 6:10)
)
)
[Package vecvec version 0.1.0 Index]