[R] removing a word, the following space and the next word

Bob Green bgreen at dyson.brisnet.org.au
Sat Sep 20 08:24:36 CEST 2008


I am hoping for advice as to how I could remove all words immediately 
following the words 'Mr' or 'Mr.' in  a csv file. For example, the 
following phrases are included in lines of text (along with other Mr) 
that could be anywhere in the file: "Mr Jones ate lunch" and "Mr 
Smith was tied".

I want to remove the words Jones and Smith (etc) leaving the other 
text intact.

Any suggestions are appreciated,



More information about the R-help mailing list