# NOT RUN {
x <- sprintf("%s%s", LETTERS, 1:26)
txt_nextgram(x, n = 2)
data.frame(words = x,
bigram = txt_nextgram(x, n = 2),
trigram = txt_nextgram(x, n = 3, sep = "-"),
quatrogram = txt_nextgram(x, n = 4, sep = ""),
stringsAsFactors = FALSE)
x <- c("A1", "A2", "A3", NA, "A4", "A5")
data.frame(x,
bigram = txt_nextgram(x, n = 2, sep = "_"),
stringsAsFactors = FALSE)
# }
Run the code above in your browser using DataLab