Flattens a vecvec into a plain R vector by casting all elements to a
common type. This is the inverse of vecvec().
Type resolution follows vctrs coercion rules: when ptype is NULL the
common type is determined automatically from the slots of x via
vctrs::vec_ptype_common(). If no common type can be found (e.g. all slots
are empty), the result falls back to logical().
unvecvec(x, ptype = NULL)A vecvec object.
A prototype specifying the desired output type, e.g.
character() or numeric(). If NULL (the default), the common type is
inferred from the elements of x using vctrs::vec_ptype_common(),
falling back to logical() when no common type can be determined. Passing
an explicit ptype is useful when you need a guaranteed output type
regardless of what x contains, or when automatic inference would pick an
undesirable type.
A vector of length length(x) and type ptype (or the inferred
common type when ptype = NULL). Positions corresponding to NA indices
in the underlying vecvec structure are filled with NA.
vecvec() to create a vecvec; vctrs::vec_ptype_common() for
the type inference rules; vctrs::vec_cast() for the casting rules.