An animal

Description

A minimal S3 class, kept deliberately small so its whole block fits in one tooltip. Exists to show the case downlit can’t resolve on its own: a call written out by an S3 method’s full dotted name.

Usage

animal(name, sound)

## S3 method for class 'animal'
print(x, ...)

Arguments

name Character. The animal’s name.
sound Character. The sound it makes.
x An animal object.
Unused.

Value

An object of class animal.

Examples

library("alttip")

rex <- animal("Rex", "woof")
speak.animal(rex)
Rex says woof!