Title: | Knock-Knock Jokes |
---|---|
Description: | An S4 exercise for Knock-Knock Joke lovers. |
Authors: | Peter Solymos [aut,cre], Bence Solymos [ctb], Lilla Solymos [ctb] |
Maintainer: | Peter Solymos <[email protected]> |
License: | GPL-2 |
Version: | 0.1-0 |
Built: | 2024-11-19 05:25:10 UTC |
Source: | https://github.com/psolymos/KnockKnockJokes |
An S4 exercise for Knock-Knock Joke lovers.
Main function: KnockKnock
Bence, Lilla, and Peter Solymos
Maintainer: Peter Solymos <[email protected]>
KnockKnock()
KnockKnock()
Function for Knock-Knock Jokes.
KnockKnockJoke(name, punch) KnockKnock(x)
KnockKnockJoke(name, punch) KnockKnock(x)
x |
integer, id for a joke in |
name |
character, name in the joke. |
punch |
character, punchline in the joke. |
KnockKnockJoke
is used to create the S4 class for jokes.
KnockKnock()
displays a random joke from
the list inside.
An S4 object of class "KnockKnockJoke"
with 2 slots:
name
, joke
.
Bence, Lilla, and Peter Solymos <[email protected]> based on various sources (friends, library, Internet).
## create a joke object KnockKnockJoke(name="Alex", punch="Alex-plain later.") ## display random joke KnockKnock() ## display 1st joke from list KnockKnock(1)
## create a joke object KnockKnockJoke(name="Alex", punch="Alex-plain later.") ## display random joke KnockKnock() ## display 1st joke from list KnockKnock(1)