findJoke: Find joke based on keyword

Description Usage Arguments Author(s) Examples

View source: R/joke.R

Description

Find joke based on single keyword supplied.

The data-set which the function import from consists of 38,269 jokes in question-answer form. The data-set was obtained from the r/Jokes subreddit and distributed at https://www.kaggle.com/jiriroz/qa-jokes. The data is released under Released under reddit's [API terms](https://www.reddit.com/wiki/api-terms).

Usage

1
joke(keyword, t=0, pause=FALSE, max=6)

Arguments

keyword

Keyword appearing on either question or answer of the joke data-set

max

Maximum number of jokes returned. Default = 6.

t

Time interval between displaying the question and the answer. The defaulted time-interval is at 3 seconds.

pause

TRUE/FALSE. Whether to invoke a 1.5 seconds pause between two questions.

Author(s)

Adam Quek

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
findJoke("fungi", max=2)

# Question -
#
#       How much room is needed for fungi to grow?
#
# Answer -
#
#       As mushroom as possible
#
#  ===
#
# Question -
#
#       Why did the mushroom go to the party?
#
# Answer -
#
#       Because he was a fungi
#
#  ===

minerva79/joke documentation built on May 6, 2019, 6:02 p.m.