O'Reilly logo

Practical Data Science Cookbook by Abhijit Dasgupta, Benjamin Bengfort, Sean Patrick Murphy, Tony Ojeda

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Exploring and describing fuel efficiency data

Now that we have imported the automobile fuel efficiency dataset into R and learned a little about the nuances of importing, the next step is to do some preliminary analysis of the dataset. The purpose of this analysis is to explore what the data looks like and get your feet wet with some of R's most basic commands.

Getting ready

If you completed the previous recipe, you should have everything you need to continue.

How to do it...

The following steps will lead you through the initial exploration of our dataset, where we compute some basic parameters about the dataset:

  1. First, let's find out how many observations (rows) are in our data:
    nrow(vehicles)
    ## 34287
    
  2. Next, let's find out how many variables (columns) ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required