title: R replace multiple columns by merging another data
body: <p>I want to replace mupltiple columns by merging another data. 
  For example: I have two data frames, I want to replace columns of <code>dat2</code> by using <code>dat1</code>.</p>
  
  <pre><code>  set.seed(1234)
    dat1 = data.frame(userId = c(1:10), value = sample(100, 10))
    #    userId value
    # 1       1    84
    # 2       2    29
    # 3       3    27
    # 4       4    19
    # 5       5    23
    # 6       6    31
    # 7       7    99
    # 8       8    15
    # 9       9     4
    # 10     10    20
  
    dat2 = data.frame(var1 = 1:5, var2 = 10:6, var3 = sample(10, 5))
    #   var1 var2 var3
    # 1    1   10    7
    # 2    2    9    5
    # 3    3    8    3
    # 4    4    7   10
    # 5    5    6    2
  </code></pre>
  
  <p>Expected output:</p>
  
  <pre><code>  # &gt; dat2
    #   var1 var2 var3
    # 1   84   20   99
    # 2   29    4   23
    # 3   27   15   27
    # 4   19   99   20
    # 5   23   31   29 
  </code></pre>