find_all_words: Find all words in a given set of letters.

Description Usage Arguments Value See Also Examples

View source: R/word_finders.R

Description

Given a list of letters and a dictionary, what are all plausible combinations to create English words?

Usage

1
2
3
4
5
6
find_all_words(
  game_letters,
  min_word_length = 4,
  central_letter,
  dictionary = normal
)

Arguments

game_letters

A character vector of letters. Should either be in the format of c("l", "e", "t", "r", "s") or simply "letrs".

min_word_length

The minimum required word length; defaults to 4.

central_letter

The game expects a "central" letter; what is that? Expects a single character, e.g., "c"—if none is provided, defaults to the first letter of game_letters.

dictionary

A character list of words—defaults to the normal list from the package.

Value

A character vector of words in the form of c("first", "second", "third")

See Also

has_pangram

Examples

1
2
3
4
5
# all words using the letters letrs that include an l and are at least
# 4-letters long.
find_all_words(c("l", "e", "t", "r", "s"))
# all words using the letters drgti that are at least 3-letters long
find_all_words("drgti", min_word_length = 3)

jdbest/holoalphabetic documentation built on Feb. 10, 2022, 10:11 p.m.