title: How can I join elements (columns from dataframes) from two lists by row names using R?
body: <p>I need help please. I have two lists: the first contains ndvi time series for distinct points, the second contains precipitation time series for the same plots (plots are in the same order in the two lists).</p>
  <p>I need to combine the two lists. I want to add the column called precipitation from one list to the corresponding ndvi column from the other list respecting the dates (represented here by letters in the row names) to a posterior analises of correlation between columns. However, both time series of ndvi and precipitation have distinct lenghts and distinct dates.</p>
  <p>I created the two lists to be used as example of my dataset. However, in my actual dataset the row names are monthly dates in the format &quot;%Y-%m-%d&quot;.</p>
  <pre><code>library(tidyverse)
  
  set.seed(100)
  
  # First variable is ndvi.mon1 (monthly ndvi)
  ndvi.mon1 &lt;- vector(&quot;list&quot;, length = 3)
  for (i in seq_along(ndvi.mon1)) {
    aux &lt;- data.frame(ndvi = sample(randu$x,
                                    sample(c(seq(1,20, 1)),1),
                                    replace = T))
    
    ndvi.mon1[i] &lt;- aux
    ndvi.mon1 &lt;- ndvi.mon1 %&gt;% map(data.frame)
    rownames(ndvi.mon1[[i]]) &lt;- sample(letters, size=seq(letters[1:as.numeric(aux %&gt;% map(length))]) %&gt;% length)
  }
  
  # Second variable is precipitation
  precipitation &lt;- vector(&quot;list&quot;, length = 3)
  for (i in seq_along(ndvi.mon1)){
    prec_aux &lt;- data.frame(precipitation = sample(randu$x*500,
                                         26,
                                         replace = T))
    row.names(prec_aux) &lt;-  seq(letters[1:as.numeric(prec_aux %&gt;% map(length))])
    
    precipitation[i] &lt;- prec_aux
    precipitation &lt;- precipitation %&gt;% map(data.frame)
    rownames(precipitation[[i]]) &lt;- letters[1:(as.numeric(precipitation[i] %&gt;% map(dim) %&gt;% map(first)))]  
  }
  
  </code></pre>
  <p><strong>Can someone help me please?</strong></p>
  <p>Thank you!!!</p>
  <p>Marcio.</p>