x <- "This Jon's dogs' 'bout there in 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")
## Larger example
library(qdap)
rm_nchar_words(hamlet$dialogue, 5, extract=TRUE)Run the code above in your browser using DataLab