title: Equivalent of Pandas iloc function in dplyr
body: <p>I'm just trying to crop off rows at the top and bottom of a data frame in dplyr but can't work out to do it.</p>
  
  <p>In Pandas I would use something like iloc just to crop the rows, but can't work out how to do it with dplyr:</p>
  
  <p>This was my suggestion, but it doesn't return a result in R Studio:</p>
  
  <pre><code>df %&gt;% 
    filter(!is.na(column)) %&gt;% 
    filter(column, between(row_number(), 1, (length(df) - 3))
  </code></pre>