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.
The following steps will lead you through the initial exploration of our dataset, where we compute some basic parameters about the dataset:
First, let's find out how many observations (rows) are in our data:
nrow(vehicles) ## 34287
Next, let's find out how many variables (columns) are in our data:
ncol(vehicles) ## 74
Now, let's get a sense of which columns of data are present in the data frame using the
name
function:> names(vehicles)
The preceding command will give you the following output:
Luckily, a lot of these column...