title: Looping through elements of a list and then appending to a new list
body: <p>I've been trying to write code that would allow me to loop through the items of the list, each of which is a vector of numeric values. For elements of the vector meets a certain criterion, then I want to append those numbers to a new list that also contains a vector of numeric values.</p>
  
  <p>My dataset is structured like the following:</p>
  
  <pre><code>Col1 Col2 Col3 .... Col29
  -11   -10  -9  ....   15
  -13   -12  -11 ....   14
  </code></pre>
  
  <p>I've tried the following code thus far:</p>
  
  <pre><code>new_list &lt;- list()
  for(i in 1:length(time_list)) {
    for(j in 1:length(time_list[[i]]) {
      if(!is.na(time_list[[i]][j]) &amp; time_list[[i]][j] &gt;= 0) {
        # I am stuck here, as all the code I've run gives me an error.
      }
    }
  }
  </code></pre>
  
  <p>I want a list that's structured pretty much the same as the original, but keeping only numbers greater than or equal to 0.</p>
  
  <p>Any help would be greatly appreciated. </p>