O'Reilly logo

Learning Predictive Analytics with R by Eric Mayor

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

Case study – exploring cancer-related deaths in the US

In this section, we will explore the rate of death due to cancer in the US. This will allow us to have a better feel of the importance of plotting data using a practical example. We will also discover interesting tools along the way. We will start by discovering the dataset, plotting some data, integrating data from other sources.

The dataset is part of latticeExtra, so we will install and load it first:

install.packages("latticeExtra")
library(latticeExtra)

Note that this may update lattice and require to restart R.

Discovering the dataset

Let's start by having a look at the attributes in the dataset and 3 rows of data:

head(USCancerRates, 3)

This outputs, included in the figure below, shows that ...

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