title: String Editing in R - Taking Out Repetition
body: <p>I'm working with some character data in R, and I have some parts that have (foo)(foo) in the middle of the string. Is there anyway to automatically find those repetitions, and remove them (representing them as (foo) in the same position)?</p>
  
  <p>I'm wondering if a possible solution is to use strsplit by ), and check if there is any equivalency, and then just reappend the ) back. Would this work?</p>
  
  <p>Ex. string: "abc def (foo)(foo) abc def"</p>