n_letter_words: Create n-letter words

Description Usage Arguments Value Author(s) Examples

View source: R/n_letter_words.R

Description

Create all words of length n from given number of letters

Usage

1
2
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

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

EllaKaye/EMK documentation built on July 26, 2020, 7:42 a.m.