rquotes: Sample random quotes

Description Usage Arguments Details Value Author(s) Examples

Description

Random selection of qutes, with optional author and topic filtering.

Usage

1
rquotes(n, auth, top, replace = FALSE)

Arguments

n

number of quotes to sample.

auth

filter by author, see examples.

top

filter by topic, see examples.

replace

should sampling be with replacement?

Details

If

Value

A data.frame formed by n rows of quotes.

Author(s)

Eduardo García-Portugués (edgarcia@est-econ.uc3m.es).

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# authors and topics
levels(quotes$author)
levels(quotes$topic)

# Random quotes
set.seed(345678)
rquotes(n = 10)
rquotes(n = 10, auth = "Bertrand Russell")
rquotes(n = 10, top = "science")
rquotes(n = 10, auth = "Bertrand Russell", top = "love")

egarpor/quotes documentation built on May 16, 2019, 12:13 a.m.