title: R Filter a List
body: <p>I am trying to filter a list in R that has length 4. Each of the 4 "sections" of the list has an id unique to that section, so each section has a row with ID = 1. I want to create a new list that has 4 rows, where each observation has ID = 1. This is what I have come up with so far, but I cannot use the R filter command on a list and I am unsure of what to try next:</p>
  
  <pre><code>filter.list &lt;- ex1.list[lapply(ex1.list, filter(ex1.list, id == 1))]
  </code></pre>
  
  <p>Thank you!</p>