title: Filtering out all the rows before "X" happens
body: <p>I have a list of data frames and I'm trying to filter out all the rows before certain characters appear in the column Z (all the rows before that are &quot;NA&quot;). I tried the code</p>
  <pre><code>for(i in 1:length(list_of_df)){
  list_of_df[[i]] &lt;- list_of_df[[i]] %&gt;% dplyr::slice(which.max(list_of_df[[i]]$Z == &quot;NA&quot;)) : n()
  }
  </code></pre>
  <p>but for some reason I get</p>
  <pre><code>Error in UseMethod(&quot;slice&quot;) : 
    no applicable method for 'slice' applied to an object of class &quot;c('integer', 'numeric')&quot;
  </code></pre>
  <p>What's going on here and how could I fix the problem?</p>