title: Compare lists in dataframes based on personal code, shorten one lists if longer
body: <p>I have two separate dataframes each for one speaker of an interacting dyad. They have different amounts of talk-turns (rows) which is why I keep them in separate files for now.</p>
  
  <p>In order to run my final analyses I need identical number of rows for each speaker. </p>
  
  <p>So what I want to do is compare dyad_id 1 in both data frames and then shorten the longer list for one by deleting the last row for all columns.</p>
  
  <p>I prepared a data frame to illustrate what I already have.</p>
  
  <p>So far, I tried to split the data frame by the dyad_id in both data sets to now compare the splits one after another and delete the unnecessary rows. As I have various conversations, I need to automate this to go through all dyad_ids one after another.</p>
  
  <p>I hope someone can help me, I am completely lost.</p>
  
  <pre><code>dyad_id_A &lt;- c(1,1,1,2,2,2,2,3,3,3,3,3)
  fw_quantiles_a &lt;- c(4,3,1,2,3,2,4,1,4,5,6,7)
  df_A&lt;- data.frame(dyad_id_A,fw_quantiles_a)
  
  
  dyad_id_B &lt;- c(1,1,1,1,2,2,2,3,3,3,3)
  fw_quantiles_b &lt;- c(3,1,2,1,2,4,1,3,3,4,5)
  df_B &lt;- data.frame(dyad_id_B,fw_quantiles_b)
  </code></pre>
  
  <h1>example for final dataset</h1>
  
  <pre><code>dyad_id_AB &lt;- c(1,1,1,2,2,2,3,3,3,3)
  </code></pre>
  
  <h1>What I tried so far:</h1>
  
  <pre><code>split_conv_A = split(df_A, list(df_A$dyad_id_A))
  split_conv_B = split(df_B, list(df_B$dyad_id_B))
  </code></pre>