title: rename list of dataframe columns to mimic joined suffixes
body: <p>I have a list of dataframes:</p>
  
  <pre><code>dd &lt;- list()
  
  dd$data &lt;- list(
    ONE = data.frame(inAll = c(1.1,1.2,1.3), inAll_2 = c(1.4,1.5,1.6)),
    TWO = data.frame(inAll = c(2.1,2.2,2.3), inAll_2 = c(2.4,2.5,2.6)),
    THREE = data.frame(inAll = c(3.1,3.2,3.3), inAll_2 = c(3.4,3.5,3.6)),
    FOUR = data.frame(inAll = c(4.1,4.2,4.3), inAll_2 = c(4.4,4.5,4.6)),
    FIVE = data.frame(inAll = c(5.1,5.2,5.3), inAll_2 = c(5.4,5.5,5.6)),
    SIX = data.frame(inAll = c(6.1,6.2,6.3), inAll_2 = c(6.4,6.5,6.6))
  )
  </code></pre>
  
  <p>And then reduce those dataframes using suffixes</p>
  
  <pre><code>reduce(dd$data, full_join, by = "inAll", suffix = c("_x", "_y"))
  </code></pre>
  
  <p>My desired output is </p>
  
  <pre><code>map(dd$data, list())
  </code></pre>
  
  <p>BUT I want the names to be the same as the suffixes in the reduced dataset. </p>
  
  <p>How do I expand on this map function so that I rename the columns in the list to reflect the reduced names?</p>
  
  <h1>PATTERN:</h1>
  
  <p>[I tried looking at the join source code for this!] and it looks like all matching but not joined on columns are:</p>
  
  <ul>
  <li>given _x then _y suffix </li>
  <li>this continues with _x_x and _y_y and so on</li>
  <li>if the number of list items with repeating column no suffix last</li>
  </ul>
  
  <p><em>Note that these data frames in my example generally have other columns AND the columns are not always in the same order so I want to avoid anything fragile like matching by index!</em></p>
  
  <pre><code>new_names &lt;- function(df) {
    # logic about new suffixes somehow
    map(df,list())
  }
  </code></pre>
  
  <h1>Desired Output</h1>
  
  <p>A list that looks like this:</p>
  
  <pre><code>dd$data2 &lt;- list(
    ONE = data.frame(inAll = c(1.1,1.2,1.3), inAll_2_x = c(1.4,1.5,1.6)),
    TWO = data.frame(inAll = c(2.1,2.2,2.3), inAll_2_y = c(2.4,2.5,2.6)),
    THREE = data.frame(inAll = c(3.1,3.2,3.3), inAll_2_x_x = c(3.4,3.5,3.6)),
    FOUR = data.frame(inAll = c(4.1,4.2,4.3), inAll_2_y_y = c(4.4,4.5,4.6)),
    FIVE = data.frame(inAll = c(5.1,5.2,5.3), inAll_2_x_x_x = c(5.4,5.5,5.6)),
    SIX = data.frame(inAll = c(6.1,6.2,6.3), inAll_2_y_y_y = c(6.4,6.5,6.6))
  )
  
  </code></pre>