Learn R Programming

statquotes (version 0.3.3)

statquote: Display a randomly chosen statistical quote.

Description

Display a randomly chosen statistical quote.

Usage

statquote(ind = NULL, pattern = NULL, tag = NULL, source = NULL, topic = NULL)

# S3 method for statquote print(x, cite = TRUE, width = NULL, ...)

# S3 method for statquote as.data.frame(x, row.names = NULL, optional = FALSE, ...)

Value

A character vector containing one quote. It is of class statquote for which an S3 print method will be invoked, and for which other methods are available.

Arguments

ind

Integer or character. If 'ind' is missing, a random quote is chosen from all quotations. If 'ind' is specified and is an integer, return the ind^th quote. If 'ind' is specified and is character, use it as the 'pattern'.

pattern

Character string. Quotes are subset to to those which match the pattern in the quote text.

tag

Character string. Quotes are subset to those matching the specified tag.

source

Character string. Quotes are subset to those matching the specified source (person).

topic

Deprecated. Use 'tag' instead. Only kept for backward compatibility.

x

object of class 'statquote'

cite

logical; should the cite field be printed?

width

Optional print width parameter

...

Other optional arguments, unused here

row.names

see as.data.frame

optional

see as.data.frame

See Also

quote_tags, search_quotes, quotes, Inspired by: fortune

as.latex, as.markdown

Examples

Run this code
set.seed(1234)
statquote()
statquote(10)
statquote("boggled")
statquote(pattern="boggled")
statquote(source="Yates")
statquote(tag="anova")
print.data.frame(statquote(302)) # All information

Run the code above in your browser using DataLab