Title: | Random Chuck Norris Facts |
---|---|
Description: | R functions for generating and/or displaying random Chuck Norris facts. Based on data from the 'Internet Chuck Norris database' ('ICNDb'). |
Authors: | Brandon Greenwell [aut, cre] |
Maintainer: | Brandon Greenwell <[email protected]> |
License: | GPL (>= 2) |
Version: | 0.0.1.9000 |
Built: | 2025-02-11 06:13:11 UTC |
Source: | https://github.com/bgreenwell/roundhouse |
A data frame of various Chuck Norris facts. Warning, some facts contain explicit language!
data(facts, package = "roundhouse")
data(facts, package = "roundhouse")
A data frame with 574 rows and 1 column.
http://www.icndb.com/
head(roundhouse::facts) # Or use data(facts, package = "roundhouse") head(facts)
head(roundhouse::facts) # Or use data(facts, package = "roundhouse") head(facts)
Generate a roundhouse kick from Chuck Norris...with a random fact (or user- supplied text).
kick(text = NULL, type = 1, width = 35, size = 20, color = "white", fps = NULL, loop = 0, ...)
kick(text = NULL, type = 1, width = 35, size = 20, color = "white", fps = NULL, loop = 0, ...)
text |
Character string specifying the text to display with the
roundhouse (preferably, a Chuck Norris fact). If |
type |
Integer specifying which roundhouse kick to generate. Current options are 1 (standard roundhouse kick) or 2 (roundhouse kick bad guy through bar window). Default is 1. |
width |
Integer specifying the number of characters per line. Default is 35 |
size |
Integer specifying the font size in pixels. Default is 10. |
color |
Character string specifying the color of the text. |
fps |
Integer specifying the frames per second of the roundhouse kick. (Must be a factor of 100.) |
loop |
Integer specifying the number of times the roundhouse kick should
be repeated. Though a single roundhouse kick is always sufficient, the
default is |
... |
Additional optional arguments to be passed onto
|
## Not run: # Random fact kick(width = 40, size = 15) # User-supplied text kick("Chuck Norris can’t test for equality because he has no equal.", type = 2, width = 40, size = 25, fps = 5) ## End(Not run)
## Not run: # Random fact kick(width = 40, size = 15) # User-supplied text kick("Chuck Norris can’t test for equality because he has no equal.", type = 2, width = 40, size = 25, fps = 5) ## End(Not run)
Generate a roundhouse punch from Chuck Norris...with a random fact (or user- supplied text).
punch(text = NULL, width = 35, size = 20, color = "white", fps = NULL, loop = 0, sound = FALSE, sound_repeat = 1, sound_delay = 0, ...)
punch(text = NULL, width = 35, size = 20, color = "white", fps = NULL, loop = 0, sound = FALSE, sound_repeat = 1, sound_delay = 0, ...)
text |
Character string specifying the text to display with the
roundhouse (preferably, a Chuck Norris fact). If |
width |
Integer specifying the number of characters per line. Default is 35 |
size |
Integer specifying the font size in pixels. Default is 10. |
color |
Character string specifying the color of the text. |
fps |
Integer specifying the frames per second of the roundhouse punch. (Must be a factor of 100.) |
loop |
Integer specifying the number of times the roundhouse punch
should be repeated. Though a single roundhouse punch is always sufficient,
the default is |
sound |
Logical indicating whether or not "Chuck Norris" should be
shouted when generating random facts. Default is |
sound_repeat |
Integer specifying the number of times the sound should
be repeated. Default is 1. (Only matters if |
sound_delay |
Integer specifying the delay (in seconds) to wait before
shouting "Chuck Norris". Default is 0. (Only matters if |
... |
Additional optional arguments to be passed onto
|
## Not run: # Random fact punch(width = 40, size = 15) # User-supplied text punch("Chuck Norris can’t test for equality because he has no equal.", type = 2, width = 40, size = 25, fps = 5) ## End(Not run)
## Not run: # Random fact punch(width = 40, size = 15) # User-supplied text punch("Chuck Norris can’t test for equality because he has no equal.", type = 2, width = 40, size = 25, fps = 5) ## End(Not run)
Query the internet Chuck Norris database (ICNDb) for a random Chuck Norris fact.
random_fact(n = 1L, include = NULL, exclude = NULL, sound = FALSE, sound_repeat = 1)
random_fact(n = 1L, include = NULL, exclude = NULL, sound = FALSE, sound_repeat = 1)
n |
Integer specifying the number of random facts to return. Default is
|
include |
Character string specifying the category of the joke. Default
is |
exclude |
Character string specifying the categories to exclude.
Default is |
sound |
Logical indicating whether or not "Chuck Norris" should be
shouted when generating random facts. Default is |
sound_repeat |
Integer specifying the number of times the sound should
be repeated. Default is 1. (Only matters if |
An object of class "random_fact"
; essentially a character
vector.
# Generate a random fact random_fact() # Generate multiple random facts random_fact(3, sound = TRUE)
# Generate a random fact random_fact() # Generate multiple random facts random_fact(3, sound = TRUE)
Have a new Chuck Norris fact you want added to the database? Use this function to open a new issue on roundhouse's GitHub page. If it's good, I'll be sure to include it in the next release!
suggest_new_fact(fact, user, password)
suggest_new_fact(fact, user, password)
fact |
Character string specifying a new Chuck Norris fact. |
user |
Character string specifying a valid GitHub username. |
password |
Character string specifying a valid password associated with the above GitHub username. |
## Not run: request_new_fact ## End(Not run)
## Not run: request_new_fact ## End(Not run)