tests/testthat/deprecated/user/R/code.R

method(gen, class_double) <- function(x, ...) "double"
method(shout, class_character) <- \(x, ...) toupper(x)
method(gen, Foo) <- function(x, ...) x@value
Child := new_class(parent = Foo)
saved <- Child(value = 3)
gen := new_external_generic(package = "deprecatedHome", dispatch_args = "x")
method(gen, class_character) <- function(x, ...) "character"
.onLoad <- function(...) S7_on_load()

Try the S7 package in your browser

Any scripts or data that you put into this service are public.

S7 documentation built on Nov. 19, 2026, 9:06 a.m.