statquote {statquotes} | R Documentation |
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 class 'statquote'
print(x, cite = TRUE, width = NULL, ...)
## S3 method for class 'statquote'
as.data.frame(x, row.names = NULL, optional = FALSE, ...)
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 compatability. |
x |
object of class |
cite |
logical; should the |
width |
Optional print width parameter |
... |
Other optional arguments, unused here |
row.names |
see |
optional |
see |
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.
See Also
quote_tags
, search_quotes
, quotes
,
Inspired by: fortune
Examples
set.seed(1234)
statquote()
statquote(10)
statquote("boggled")
statquote(pattern="boggled")
statquote(source="Yates")
statquote(tag="anova")
print.data.frame(statquote(302)) # All information