n_letter_words: Create n-letter words

View source: R/n_letter_words.R

n_letter_wordsR Documentation

Create n-letter words

Description

Create all words of length n from given number of letters

Usage

n_letter_words(
  n,
  num_letters = 26,
  case = c("upper", "lower"),
  as_vector = FALSE
)

Arguments

n

the length of the words

num_letters

how many letters to use in the word (an integer between 1 and 26)

case

choose between upper or lower case letters

as_vector

logical

Value

If as_vector = FALSE, a one column tibble with colname "word" containing all words of length n made with a combination of num_letter letters. If as_vector = TRUE, a vector of all such words.

Author(s)

Ella Kaye

Examples

n_letter_words(3)
n_letter_words(4, num_letters = 2, case = "lower", as_vector = TRUE)

EllaKaye/EMK documentation built on Jan. 7, 2023, 3:24 p.m.