Exercise

Inspecting dataframes

There are several functions you can use to inspect your dataframe. To name a few

  • head: this by default prints the first 6 rows of the dataframe
  • tail: this by default prints the last 6 rows to the console
  • str: this prints the structure of your dataframe
  • dim: this by default prints the dimensions, that is, the number of rows and columns of your dataframe
  • colnames: this prints the names of the columns of your dataframe

Instructions

100 XP
  • Print the first 6 rows of mtcars
  • Print the structure of the dataframe mtcars
  • Print the dimensions of the dataframe mtcars