A small data frame:
words <- data.frame(terms = c("qhick brown fox",
"tom dick harry",
"cats dgs"))
If I use qdap::which_misspelled
I can find out missspelled words:
> which_misspelled(words)
1 8
"qhick" "dgs"
But what I want to do is to subset words df on the rows that contain misspelling. The above returns index 1 and 8 referring to all words provided in my df, regardless of which row.
How can I subset my df based on any rows that contain misspelled words?
(Bonus if can be done with dplyr filter)