s3_register: Register an s3 method

View source: R/zzz.R

s3_registerR Documentation

Register an s3 method

Description

This is a reimplementation of vctrs::s3_register(), implemented here to avoid having to take a dependency on vctrs.

Usage

s3_register(generic, class, method = NULL)

Arguments

generic

Name of the generic in the form pkg::generic.

class

Name of the class

method

Optionally, the implementation of the method. By default, this will be found by looking for a function called generic.class in the package environment.

Note that providing method can be dangerous if you use devtools. When the namespace of the method is reloaded by devtools::load_all(), the function will keep inheriting from the old namespace. This might cause crashes because of dangling .Call() pointers.

Value

Invisible NULL, called for side effects.


vegawidget documentation built on May 29, 2024, 12:17 p.m.