This gives an example of text cleaning with R. For regular expressions and R commands on string manipulations, see A Beginner Guide to String Pattern Matching in R by Regular Expression.
Write R code to clean the following raw collection which contains five strings.
This is a data science book. He is very happy today <U+1F600> Do you carefully read every word on your statement and every notice your bank every sent you? .........waiting........ NA
By removing punctuations, stop words (including this, is, a, he, you, your, and) and extra whitespace characters and trimming leading and trailing space from start and end of each string, printing collection should produce the following output in R:
> collection  " This is a data science book."  " He is very happy today <U+1F600>"  "Do you carefully read every word on your statement and every notice your bank every sent you?"  ".........waiting........"  NA