title: From table format to list
body: <p>I have a table that contains a specimen  ID and a collection date (see image of original excel table). <a href="https://i.stack.imgur.com/ugzng.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ugzng.png" alt="table" /></a></p>
  <p>I would like to use R to convert this table into a list that will start with the specimen ID, collection date and location. SO, in this example, the list will start with:</p>
  <pre><code>4820201  19-04-2021  A1
  4820202  19-04-2021  A2
  </code></pre>
  <p>I added the dput of the dataframe after I imported it from excel to R:</p>
  <pre><code>structure(list(...1 = c(&quot;Bakje 1a&quot;, &quot;Serum 300 ul&quot;, &quot;VOCAAL&quot;, 
  &quot;A&quot;, NA, &quot;B&quot;, NA, &quot;C&quot;, NA, &quot;D&quot;, NA, &quot;E&quot;, NA, &quot;F&quot;, NA, &quot;G&quot;, NA, 
  &quot;H&quot;, NA, NA), ...2 = c(&quot;Locatie VK20&quot;, &quot;T2 regulier&quot;, &quot;1&quot;, &quot;4820201&quot;, 
  &quot;44305&quot;, &quot;4820202&quot;, &quot;44305&quot;, &quot;4820203&quot;, &quot;44305&quot;, &quot;4820204&quot;, &quot;44305&quot;, 
  &quot;4820206&quot;, &quot;44305&quot;, &quot;4820207&quot;, &quot;44305&quot;, &quot;4820208&quot;, &quot;44305&quot;, NA, 
  NA, NA), ...3 = c(&quot;Vriezer -80: 3394&quot;, NA, &quot;2&quot;, NA, NA, NA, NA, 
  NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), ...4 = c(&quot;Toren 5&quot;, 
  NA, &quot;3&quot;, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 
  NA, NA, NA, NA), ...5 = c(&quot;Positie in toren: 4&quot;, NA, &quot;4&quot;, NA, 
  NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA
  ), ...6 = c(NA, NA, 5, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 
  NA, NA, NA, NA, NA, NA, NA), ...7 = c(NA, NA, 6, NA, NA, NA, 
  NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), ...8 = c(NA, 
  NA, 7, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 
  NA, NA, NA), ...9 = c(NA, NA, 8, NA, NA, NA, NA, NA, NA, NA, 
  NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), ...10 = c(NA, NA, 9, 
  NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 
  NA), ...11 = c(NA, NA, 10, NA, NA, NA, NA, NA, NA, NA, NA, NA, 
  NA, NA, NA, NA, NA, NA, NA, NA), ...12 = c(NA, NA, 11, NA, NA, 
  NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), 
      ...13 = c(NA, NA, 12, NA, NA, NA, NA, NA, NA, NA, NA, NA, 
      NA, NA, NA, NA, NA, NA, NA, NA), ...14 = c(NA, NA, NA, NA, 
      NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 
      NA), ...15 = c(NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 
      NA, NA, NA, NA, NA, NA, NA, NA, NA), ...16 = c(NA, NA, NA, 
      NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 
      NA, NA), ...17 = c(NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 
      NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), ...18 = c(NA, NA, 
      NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 
      NA, NA, NA), ...19 = c(NA, NA, NA, NA, NA, NA, NA, NA, NA, 
      NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), ...20 = c(NA, 
      NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 
      NA, NA, NA, NA)), row.names = c(NA, -20L), class = c(&quot;tbl_df&quot;, 
  &quot;tbl&quot;, &quot;data.frame&quot;))
  </code></pre>
  <p>I've been mainly trying a lot with using seq along the rows but because the specimen ID and collection date are written on two different cell values, i can't figure out how to tell R that the row with the specimen ID and collection date belong to the same location..</p>
  <p>Hope you can help!</p>
  <p>Thanks in advance</p>