We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Firefox.

Select first or last rows of a data frame

We often do not need to look at all the contents of a data frame in the console. Instead, only parts of it are sufficient like the top or bottom retrieved through the head() and tail() functions.

  • Select the top of a data frame
  • Select the bottom of a data frame
  • Specify the number of lines to select through the parameter n
head(___, n = ___)
tail(___, n = ___)
View Interactive Version