Determine the size of a data frame

The size of a data frame, like the number of rows or columns, is often required and can be determined in various ways.

  • Get number of rows of a data frame
  • Get number of columns of a data frame
  • Get dimensions of a data frame
nrow(___)
ncol(___)
dim(___)
length(___)
View Interactive Version
Determine the size of a data frame