class_any | R Documentation |
Use class_any
to register a default method that is called when no other
methods are matched.
class_any
foo <- new_generic("foo", "x")
method(foo, class_numeric) <- function(x) "number"
method(foo, class_any) <- function(x) "fallback"
foo(1)
foo("x")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.