This function modifies a block of text by randomly replacing a set number of words with a random animal.

textTransformer(text, num_words = 1)

Arguments

text

String Character

num_words

Integer

Value

a string with the modified text

Examples

text = "Your chances of being ambushed by a duck are low... but never zero!"
textTransformer(text)
#> [1] "Your chances of being ambushed horse a duck are low... but never zero!"