x <- "This is Jon's dogs' 'bout there in a word Mike's re'y."
rm_nchar_words(x, 4)
rm_nchar_words(x, 4, extract=TRUE)
## Count characters (apostrophes and letters)
rm_nchar_words(x, 5, extract=TRUE, pattern = "@rm_nchar_words2")
## nchar range
rm_nchar_words(x, "1,2")
## Larger example
library(qdap)
rm_nchar_words(hamlet[["dialogue"]], 5, extract=TRUE)Run the code above in your browser using DataLab