On 18-Oct-10 14:58:05, kurt_h...@nps.gov wrote: > Greetings > I want to remove numbers from a string of characters that > identify sites so that I can merge two data frames. > For example, a site in one frame is called > "001a Frozen Niagara Entrance" whereas the same site > in the other data frame is called "Frozen Niagara Entrance". > It seems to me the easiest thing to do would be to remove > the numbers from the first data frame so the two will match. > How do I go about removing those numbers? > Thanks in advance. > Cheers > Kurt
Try something based on: X <- "001a Frozen Niagara Entrance" sub("[[:alnum:]]* ","",X) # [1] "Frozen Niagara Entrance" Hoping this helps! Ted. -------------------------------------------------------------------- E-Mail: (Ted Harding) <ted.hard...@wlandres.net> Fax-to-email: +44 (0)870 094 0861 Date: 18-Oct-10 Time: 16:19:08 ------------------------------ XFMail ------------------------------ ______________________________________________ R-help@r-project.org mailing list 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.