I have a Vector Corpus in R. I want to remove all email ID's appearing in that corpus. The email IDs can be at any position in the corpus. Say e.g.
1> "Could you mail me the Company policy amendments at xyz@gmail.com. Thank you."
2> "Please send me an invoice copy at abcdef@yahoo.co.in. Looking forward to your reply".
So here I want the email IDs "xyz@gmail.com" and "abcdef@yahoo.co.in" to be removed from the corpus only.
I have tried using :
corpus <- tm_map(corpus,removeWords,"\w*gmail.com\b")
corpus <- tm_map(corpus,removeWords,"\w*yahoo.co.in\b")