trying to switch out addresses that have double directions, such as the following example:
a = "S S Main St & Interstate 95" a = gsub(pattern="S S ", replacement="S ", a) the problem is that I don't want to affect instances where this might be a correct address such as the following: "3421 BIGS St" what I want to say is switch out only if this is either of the following situations [beginning of char]S S" " S S " "S S[end of char] Is there anyway of making gsub or a similar function make the replacements I want? Thanks in advance for your help. ~Markus [[alternative HTML version deleted]]
______________________________________________ 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.