title: Remove last N rows in data frame with the arbitrary number of rows
body: <p>I have a data frame and I want to remove last N rows from it.
  If I want to remove 5 rows, I currently use the following command, which in my opinion is rather convoluted:</p>
  
  <pre><code>df&lt;- df[-seq(nrow(df),nrow(df)-4),]
  </code></pre>
  
  <p>How would you accomplish task, is there a convenient function that I can use in R?</p>
  
  <p>In unix, I would use:</p>
  
  <pre><code>tac file | sed '1,5d' | tac 
  </code></pre>