Description Usage Arguments Value Examples
View source: R/wiki_randomfact.R
'wiki_randomfact()' generates random facts from Wikipedia main pages after 1 January 2015.
1 2 3 4 5 6 | wiki_randomfact(
n_facts = 1L,
fact = c("any", "didyouknow", "onthisday", "inthenews"),
bare_fact = FALSE,
repeats = TRUE
)
|
n_facts |
An integer determining the number of facts that will be generated. |
fact |
String to determine the type of fact to be randomly generated - "any" will generate a random selection. |
bare_fact |
Logical. Determining whether the fact should be quoted as is or surrounded by a preamble and courtesy statement. |
repeats |
Logical. Determining if repeat facts should be permitted. If FALSE the number of facts may be less than requested. |
A vector of strings with random items from Wikipedia's main page - otherwise "I got nothin'"
1 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.