Exploring Datasets

In this section, we will use the built-in datasets to investigate the relationships between continuous variables, such as temperature and airquality. We'll explore and understand the datasets available in R.

Let's begin by executing the following steps:

  1. Type data() in the command line to list the datasets available in R. You should see something like the following:

  1. Choose the following datasets: mtcars, air quality, rock, and sleep.
The number of levels only applies to factor data.
  1. List two variables of each type, the dataset names, and the other columns of this table.
  2. To view the data type, use the str command (for ...

Get Applied Data Visualization with R and ggplot2 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.