Hello,I have a column of my?data of the Following format 10. Arnold125. Jessica1. Romeo117. Juliet I need to eliminate the numbers, period, and the space before the names so that I have the following: ArnoldJessicaRomeoJuliet I tried using the gsub function but my code came up with errors. Any help will be appreciated. Thank you. [[alternative HTML version deleted]]
Boris Steipe
2017-Apr-11 02:51 UTC
[R] Eliminating numbers, period, and space from a string
Fie, knave, dost thou bid us do thine homework! gsub("[^A-Za-z]", "", <string>)> On Apr 10, 2017, at 7:11 PM, Olu Ola via R-help <r-help at r-project.org> wrote: > > Hello,I have a column of my data of the Following format > 10. Arnold125. Jessica1. Romeo117. Juliet > I need to eliminate the numbers, period, and the space before the names so that I have the following: > ArnoldJessicaRomeoJuliet > I tried using the gsub function but my code came up with errors. > Any help will be appreciated. > Thank you. > > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.