random_fact: Random Chuck Norris facts

Description Usage Arguments Value Examples

View source: R/random_fact.R

Description

Query the internet Chuck Norris database (ICNDb) for a random Chuck Norris fact.

Usage

1
2
random_fact(n = 1L, include = NULL, exclude = NULL, sound = FALSE,
  sound_repeat = 1)

Arguments

n

Integer specifying the number of random facts to return. Default is 1.

include

Character string specifying the category of the joke. Default is NULL meaning use all available categories in the query. The available categories can be viewed using fetch_categories(). (Currently ignored.)

exclude

Character string specifying the categories to exclude. Default is NULL meaning use all available categories in the query. The available categories can be viewed using fetch_categories(). (Currently ignored.)

sound

Logical indicating whether or not "Chuck Norris" should be shouted when generating random facts. Default is FALSE.

sound_repeat

Integer specifying the number of times the sound should be repeated. Default is 1. (Only matters if sound = TRUE.)

Value

An object of class "random_fact"; essentially a character vector.

Examples

1
2
3
4
5
# Generate a random fact
random_fact()

# Generate multiple random facts
random_fact(3, sound = TRUE)

bgreenwell/roundhouse documentation built on Sept. 16, 2019, 8:51 a.m.