[R] find and replace

R. Michael Weylandt <michael.weylandt@gmail.com> michael.weylandt at gmail.com
Tue Aug 28 05:05:09 CEST 2012


Take a look at gsub()

Michael

On Aug 27, 2012, at 6:47 PM, Sapana Lohani <lohani.sapana at ymail.com> wrote:

> Hi, 
> 
> My data frame (Students) is
> 
> ID Name Fav_Place
> 101 Andrew� Phoenix AZ
> 201 John San Francisco
> 303 JulieCalifornia / New York
> 304 Monica� New York
> 
> How can I replace Phoenix with Tucson & New York with New York City in the df?
> 
> Thanks
>    [[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help at 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.




More information about the R-help mailing list