title: Match and replace multiple strings in a vector of text without looping in R
body: <p>I am trying to apply gsub in R to replace a match in string a with the corresponding match in string b. For example:</p>
  
  <pre><code>a &lt;- c("don't", "i'm", "he'd")
  b &lt;- c("do not", "i am", "he would")
  c &lt;- c("i'm going to the party", "he'd go too")
  newc &lt;- gsub(a, b, c)
  </code></pre>
  
  <p>with the desired result being</p>
  
  <p><code>newc = c("i am going to the party", "he would go too")</code></p>
  
  <p>This approach does not work because gsub only accepts a string of length 1 for a and b. Executing a loop to cycle through a and b will be very slow since the real a and b have a length of 90 and c has a length > 200,000. Is there a vectorized way in R to perform this operation?</p>