# Example 1 ----
words <- c("dog", "cat", "horse", "frog", "cow", "fox")
ex1 <- wordsearch(words, r = 10, c = 10)
plot(ex1, solution = TRUE)
# Example 2 ----
clues <- c("Bark", "Meow", "Neigh", "Ribbit", "Moo", "Nee Nee Nee")
ex2 <- wordsearch(words = words, clues = clues)
plot(ex2, solution = TRUE, title = "Animal Sounds", legend_size = 4)
# Example 3 ----
math <- dplyr::tribble(
~problem, ~solution,
"2 + 2", "four",
"5 + 3", "eight",
"9 - 4", "five",
"1 + 0", "one",
"2 + 1", "three",
"5 + 5", "ten",
"6 - 6", "zero"
)
ex3 <- wordsearch(words = math$solution, clues = math$problem)
plot(ex3, solution = TRUE, title = "Math is Fun")
Run the code above in your browser using DataLab