class_missing {S7}R Documentation

Special dispatch types

Description

Usage

class_missing

class_any

Format

An object of class S7_missing of length 0.

An object of class S7_any of length 0.

Value

Sentinel objects used for special types of dispatch.

Examples

foo <- new_generic("foo", "x")
method(foo, class_integer) <- function(x) "integer"
method(foo, class_missing) <- function(x) "missing"
method(foo, class_any) <- function(x) "fallback"

foo(1)
foo()
foo("x")

[Package S7 version 0.1.1 Index]