This function is primarily useful as a building block for other functions.
The implementation also illustrates the key ideas of the vctrs type system,
and allows you to experiment interactively.
Usage
vec_coerce(..., .ptype = NULL)
Arguments
...
Vectors to coerce.
.ptype
If NULL, the default, the output type is determined by
computing the common type across all elements of ....
Alternatively, you can supply .ptype to give the output known type.
If getOption("vctrs.no_guessing") is TRUE you must supply this value:
this is a convenient way to make production code demand fixed types.
Value
A list_of input vectors coerced to .ptype, an error stating
that a common type could not be found, or an error stating that casting
a input to .ptype was not possible.