title: How to sum multiple columns in two data frames in r
body: <p>This question is similar to this one: <a href="https://stackoverflow.com/questions/45752766/r-sum-column-wise-value-of-two-more-data-frames-having-same-variables-column-n">R: Sum column wise value of two/more data frames having same variables (column names) and take Date column as reference</a> , but my dfs have different number of columns, columns names and there is not a specific reference column.</p>
  <p>Modifying his example:</p>
  <p>df1:</p>
  <pre><code>      V1  V2  V3  
         2   4   5   
         3   5   7 
  </code></pre>
  <p>df2:</p>
  <pre><code>      V1  V5  V2  V4   
         2   4  4   5   
         3   0  5   7
  </code></pre>
  <p>I want the result as:</p>
  <p>df3:</p>
  <pre><code>      V1  V2  V3  V4  V5
         4   8   5   5   4
         6  10   7   7   0
  </code></pre>
  <p>I keep getting errors like:</p>
  <pre><code>Error: Problem with `mutate()` input `..1`.
  ✖ Input `..1` can't be recycled to size 28. # 28 because this is referring to my df
  ℹ Input `..1` is `colnames(col_name)`.
  ℹ Input `..1` must be size 28 or 1, not 5992.
  Run `rlang::last_error()` to see where the error occurred.
  </code></pre>
  <p>I've tried with merge, join, by ...etc</p>