wiki_randomfact {wikifacts} | R Documentation |
Generate random facts from historic Wikipedia main pages
Description
'wiki_randomfact()' generates random facts from Wikipedia main pages after 1 January 2015.
Usage
wiki_randomfact(
n_facts = 1L,
fact = c("any", "didyouknow", "onthisday", "inthenews"),
bare_fact = FALSE,
repeats = TRUE
)
Arguments
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. |
Value
A vector of strings with random items from Wikipedia's main page - otherwise "I got nothin'"
Examples
wiki_randomfact()
[Package wikifacts version 0.4.2 Index]