Skip to main content

One fact about the platypus

Description

The package is named after the animal, and this prints something true about it. It has nothing to do with segmentation.

Usage

platypus_fact(number = NULL)

Arguments

number Which fact, from 1 to the number there are. NULL, the default, picks one at random.

Details

A fact is also printed once when the package is attached, in an interactive session only. To stop that, set options(rplatypus.facts = FALSE) in ~/.Rprofile, or the environment variable PLATYPUS_FACTS to 0 or false in ~/.Renviron.

Each fact carries the source it was read from, because several of the best-known claims about platypuses are wrong and four of these exist to say which. The numbering is stable across versions: facts are added to the end and never reordered, so a number can be quoted.

Picking one at random does not disturb the random number stream, which is the only part of this worth any care: library() must not change what set.seed(1) then produces, and suppressPackageStartupMessages() hides the message without preventing the side effect, so avoiding it is the only fix that works.

Value

An object of class platypus_fact, which prints as the fact and its source.

Examples

library("rplatypus")

platypus_fact(1)
Platypus fact nr 1: There are five living species of egg-laying mammal:
the platypus, the short-beaked echidna, and three long-beaked echidnas.
One of those is named after David Attenborough.
-- Flannery & Groves (1998), Mammalia 62:367-396; Mammal Diversity
   Database
platypus_fact()
Platypus fact nr 13: It swims with its front feet alone. The webbed
hind feet and the tail do not push - they steer.
-- Australian Museum, australian.museum/learn/animals/mammals/platypus