words <- c("dog", "cat", "horse", "frog", "cow", "fox")
ex1 <- wordsearch(words, r = 10, c = 10)
my_puzzle <- plot(ex1, solution = FALSE)
printable(my_puzzle, "my_wordsearch.pdf")
unlink("my_wordsearch.pdf")
Run the code above in your browser using DataLab