vecvec_mapply(), which applies a vectorised
function across multiple (possibly heterogeneously-typed) vectors,
batching calls by shared underlying storage slots rather than calling it
once per element as mapply() does.duplicated()/anyDuplicated(),
vec_proxy_equal(), and casting into a vecvec
are now computed slot-wise instead of materialising every element..Internal(inspect()).vecvec with duplicated
indices.cli
package.[.vecvec now compacts slots to actually referenced
rows.is.numeric() method for vecvec,
which checks the type of its slots rather than the container
itself.all.equal() method for vecvec.
Previously the default method compared the underlying storage (indices
and numeric-only slot content) rather than the represented values,
giving misleading results or erroring whenever a slot held a non-numeric
type.as.data.frame() on a vecvec always
erroring. It now wraps the vecvec as a single column, as is
done with atomic vectors.[<- and is.na<- corrupting
compressed storage shared by other, unreplaced elements when only some
of the sharers were overwritten.duplicated()/anyDuplicated()
incorrectly destructuring vctrs record-style slots
(e.g. vctrs_rcrd) element-by-element.Math generics (cumsum(),
cumprod(), cummax(), cummin())
silently erroring.unvecvec() scattering values with single-bracket
indexing, which is column (not row) selection for matrix and data frame
results. This silently gave wrong answers whenever a slot held more than
one distinct row, and hard-errored whenever an NA index was
present. It now uses
vctrs::vec_slice()/vctrs::vec_assign(), which
respect rows.vctrs::vec_ptype2 and
vctrs::vec_cast methods.print() method now respects the max.print
option and prevents ALTREP materialisation.[<- value replacement with NA indices.[<- incorrectly mutating a vecvec
when the index selects no elements
(e.g. x[FALSE] <- NA). The object is now returned
unchanged.The vecvec class has been reimplemented using S7,
replacing the previous vctrs implementation. Existing code using
vecvec objects should continue to work.
new_vecvec(), which is replaced by
class_vecvec for S7 consistency.class_vecvec.vecvec objects has been
overhauled. In practice these internal indices should not be used by
users or developers, as the structure can change in the future to
accommodate faster variants for special cases (#7).vecvec classed objects now work as matrices and arrays
(#15).is_vecvec() tests whether an object is a
vecvec.class_vecvec S7 class and constructor for vecvec
objects.vctrs methods for backwards compatibility and
vctrs interoperability.vecvec, reducing
fragmentation.is.na() for
vecvec objects (#8).vec_math() for vecvec objects.vec_apply() for applying functions to each vector
in a vecvec.vctrs::new_rcrd type
vectors.class argument vecvec() to specify
subclasses.Ops with
vecvec types.Ops when vecvec and
second argument are both length 1.vecvec dropping common
attributes.vec_proxy_equal() not comparing values across
vectors.new_vecvec() and vecvec() class
constructors.unvecvec() class deconstructor to reduce back to atomic
vectors.{vctrs} method dispatch for vecvec data
types.