In the current dev version, vec_unique() doesn’t work with lists of objects that are not vectors, or that contain non-vector elements in a recursive structure:
m <- glm(mpg ~ wt, data = mtcars)
vctrs::vec_unique(list(m, m))
#> Error: `x` must be a vector, not a `glm/lm` object
o <- list(x = expression(x))
vctrs::vec_unique(list(o, o))
#> Error: `x` must be a vector, not an expression vector
glm objects are an example of both, and can frequently appear in list columns in data frames. As vec_unique() gets more use behind the scenes in packages such as tidyr, this threatens to break code that works with list columns: e.g. tidyverse/tidyr#735 seems to be a symptom of this behaviour.
Created on 2019-11-04 by the reprex package (v0.3.0)
In the current dev version,
vec_unique()doesn’t work with lists of objects that are not vectors, or that contain non-vector elements in a recursive structure:glmobjects are an example of both, and can frequently appear in list columns in data frames. Asvec_unique()gets more use behind the scenes in packages such as tidyr, this threatens to break code that works with list columns: e.g. tidyverse/tidyr#735 seems to be a symptom of this behaviour.Created on 2019-11-04 by the reprex package (v0.3.0)