View source: R/filter_dictionary.R
filter_guess | R Documentation |
Restrict original dictionary of possible words to those that meet criteria based on information about letters that are correct, incorrect, or misplaced in the unknown target word.
filter_guess( dict = NULL, guess = NULL, target = NULL, correct = NULL, incorrect = NULL, misplaced = NULL, hide = TRUE )
dict |
Vector of strings of possible words to match. If NULL, uses |
guess |
String of guessed word |
target |
If provided, word to use as comparison to |
correct |
Vector of integers indicating the index position of all correct
letters in |
incorrect |
Vector of integers indicating the index position of all incorrect
letters in |
misplaced |
Vector of integers indicating the index position of all misplaced
letters in |
hide |
If |
Either a vector of words remaining after filtering or integer indicating the number of words remaining.
target <- "tangy" guess <- "tonal" filter_guess( guess = guess, target = target ) filter_guess( guess = guess, correct = c(1, 3), incorrect = c(2, 5), misplaced = 4 )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.