vctrs 0.2.3
-
The main feature of this release is considerable performance
improvements with factors and dates. -
vec_c()now falls back tobase::c()if the vector doesn't
implementvec_ptype2()but implementsc(). This should improve
the compatibility of vctrs-based functions with foreign classes
(#801). -
new_data_frame()is now faster. -
New
vec_is_list()for detecting if a vector is a list in the vctrs sense.
For instance, objects of classlmare not lists. In general, classes need
to explicitly inherit from"list"to be considered as lists by vctrs. -
Unspecified vectors of
NAcan now be assigned into a list (#819).x <- list(1, 2) vec_slice(x, 1) <- NA x #> [[1]] #> NULL #> #> [[2]] #> 2 -
vec_ptype()now errors on scalar inputs (#807). -
vec_ptype_finalise()is now recursive over all data frame types, ensuring
that unspecified columns are correctly finalised to logical (#800). -
vec_ptype()now correctly handles unspecified columns in data frames, and
will always return an unspecified column type (#800). -
vec_slice()andvec_chop()now work correctly withbit64::integer64()
objects when anNAsubscript is supplied. By extension, this means that
vec_init()now works with these objects as well (#813). -
vec_rbind()now binds row names. When named inputs are supplied
andnames_toisNULL, the names define row names. Ifnames_to
is supplied, they are assigned in the column name as before. -
vec_cbind()now binds row names if they are congruent across
inputs. If the row names are not identical that's an error. -
The
c()method forvctrs_vctrnow throws an error when
recursiveoruse.namesis supplied (#791).