| vec_default_cast {vctrs} | R Documentation |
This function should typically be called from the default
vec_cast() method for your class, e.g. vec_cast.myclass.default().
It does two things:
If x is an unspecified vector, it automatically casts it to
to using vec_init().
Otherwise, an error is thrown with stop_incompatible_cast().
vec_default_cast(x, to, x_arg = "x", to_arg = "to")
x |
Vectors to cast. |
to |
Type to cast to. If |
x_arg |
Argument names for |
to_arg |
Argument names for |