The glimpse() function of the dplyr package can be used to see the columns of the dataset and display some portion of the data with respect to each attribute that can fit on a single line.
We can apply this function to get a glimpse of our mpg dataset:
> glimpse(mpg)
We get the following output for the preceding code: