6.1 Data

6.1.1 Import

We will analyze data from a survey in which 60 consumers were asked to respond to six questions about toothpaste. These data were collected by the creators of Radiant, which is an R package for business analytics that we will use later on. Download the data here and import them into R:

6.1.2 Manipulate

The data set consists of one identifier, consumer, and the respondent’s ratings of the importance of six toothpaste attributes: prevents_cavities, shiny_teeth, strengthens_gums, freshens_breath, decay_prevention_unimportant, and attractive_teeth. We also have the respondent’s age and gender.

Let’s factorize the identifier and gender:

6.1.3 Recap: importing & manipulating

Here’s what we’ve done so far, in one orderly sequence of piped operations (download the data here):