Call vecvec_register() inside your package's .onLoad() function to
register the S3 methods that allow a custom
vecvec subclass to participate in the
vctrs vector system.
vecvec_register(x)An S7 class object that extends class_vecvec. Typically the
class object created by S7::new_class() in your package, e.g.
class_myvec.
NULL, invisibly. Called for its side effects.
Specifically, vecvec_register() registers:
vec_cast.<class>.* methods, so that other types can be cast to your
vecvec subclass.
vec_cast.*.<class> methods, so that your vecvec subclass can be cast
from other types.
if (FALSE) { # \dontrun{
# In your package, define a vecvec subclass:
class_myvec <- S7::new_class(
"myvec",
parent = vecvec::class_vecvec
)
# Then register it in .onLoad():
.onLoad <- function(libname, pkgname) {
S7::methods_register()
vecvec::vecvec_register(class_myvec)
}
} # }