The glimpse() function

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:

Get Hands-On Exploratory Data Analysis with R now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.