vctrs 0.7.2
-
vec_restore()'s default method now consistently clears unrecognized attributes fromx.Previously:
x <- structure(1, foo = "bar") to <- 2 vec_restore(x, to) #> structure(1, foo = "bar") x <- structure(1, foo = "bar") to <- structure(2, a = "b") vec_restore(x, to) #> structure(1, a = "b")
Now both
vec_restore()calls consistently clear the unrecognizedfooattribute (#2157). -
vec_equal()now considers two objects with the same attribute names and values equivalent even if the attribute ordering is different. This reflects the fact that attributes are generally viewed as a map rather than an ordered list (#2156). -
Pairlist tags and attribute names are now incorporated during object hashing. In practice this can come up when list elements are hashed inside functions like
vec_unique()(#2154).# Only difference is the attribute name x <- list( structure(1, foo = 2), structure(1, bar = 2) ) # Used to return `x[1]`, now returns `x` vec_unique(x)
-
vctrs is now fully compliant with the R C API.