C. Code and Utilities

“Well, here’s another nice mess you’ve gotten me into!”

—OLIVER HARDY AS OLIVER IN Sons of the Desert (1933)

The code for the spine chart function in exhibit C.1, starting on page 268 and ending on page 276 shows how to construct a customized data visualization for conjoint studies. Using standard R graphics functions, the spine chart is built one point, line, and text string at a time. Market simulation utilities are provided in exhibit C.2 on page 276. These utilities are called by the programs in the chapter about brand and price.

Utilities for grid and ggplot2 graphics are provided in exhibits C.3 and C.4. The split-plotting utilities in exhibit C.3 (pages 277 and 279) are used in a number of chapters to render ggplot2 ...

Get Modeling Techniques in Predictive Analytics: Business Problems and Solutions with R now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.