I would create a custom function such as this that will take the size of the word and the number of words you want in response
WordsGen <- function(n, size){ substring(paste(sample(LETTERS, n * size, replace = TRUE), collapse = ""), seq(1, (n - 1)*size + 1, size), seq(size, n * size, size)) } set.seed(1) WordsGen(10, 5) ## [1] "GJOXF" "XYRQB" "FERJU" "MSZJU" "YFQDG" "KAJWI" "MPMEV" "RUCSK" "VQUON" "UAMTS"
source share