title: replacing id characters in one data frame with those in another data frame
body: <p>I am trying to replace a character in my dataframe with a character from another data frame.</p>
  
  <p>So, for example:</p>
  
  <p>df1 looks like this:</p>
  
  <pre><code>   Sample aac.2...Ia aac.3..I aac.3..Ia aac.3..Id
  1 TG02036          -        -         -         -
  2 TG03227          -        -         -         -
  3 TG04597          -        -         -         -
  4 TG04623          -        -         -         -
  5 TG04629          -        -         -         -
  </code></pre>
  
  <p>I want to replace the matching rows for "Sample" in df1 with "Isolate.Barcode" in df2, which looks like this:</p>
  
  <pre><code>  Isolate.Barcode  Sample aac.2...Ia aac.3..I aac.3..Ia
  1          TG2035 TG02036          -        -         -
  2          TG1817 TG03227          -        -         -
  3          TG1818 TG04597          -        -         -
  4          TG1821 TG04623          -        -         -
  5          TG1820 TG04629          -        -         -
  </code></pre>
  
  <p>I'm trying to do this using the DataCombine package with the following code:</p>
  
  <pre><code>df1_corrected &lt;- FindReplace(df1, Var = "Sample", df2, 
                                 from = df2$Sample, 
              to = df2$Isolate.Barcode, exact = TRUE)
  </code></pre>
  
  <p>I get the following warnings:</p>
  
  <pre><code>Warning messages:
  1: In gsub(pattern = paste0("^", replaceData[i, from], "$"),  ... :
    argument 'pattern' has length &gt; 1 and only the first element will be used
  </code></pre>
  
  <p>Also, the replacement does not happen.</p>
  
  <p>Thanks for any help you can provide!!</p>