# Before loading the data, load the following packageslibrary(dplyr)library(knitr)library(kableExtra)library(ggplot2)# Load the data with the following commandsdata("winesOf3Colors", package ="data4PCCAR")# Define the colors for the plotswineColors <- winesOf3Colors$winesDescriptors$colorwineColors <-as.character(recode(wineColors, red ='indianred4', white ='gold', rose ='lightpink2'))
First data-set
The data for the wines of the 3 colors example are shown in the following tables for the 3 countries of origin: Argentina, Canada, and USA.
The illustrative (albeit fictitious) data used for this example come from a chapter by Hervé Abdi and Dominique Valentin: Multiple factor analysis. In N.J. Salkind (Ed.): Encyclopedia of Measurement and Statistics. Thousand Oaks (CA): Sage. pp. 657—663. This chapter can be downloaded from the home page of Hervé Abdi: (look for number C40) or directly here).
In this example, three different assessors (named e1, e2, and e3) evaluated 6 wines on a 9-point scale using their own descriptors:
Assessor
Descriptors
e1
fruity, woody, coffee
e2
red.fruit, roasted, vanillin, woody
e3
fruity, butter, woody
The scores are presented in the following table.
R code
data('wines2007', package ="ExPosition")# your data (a concatenated data tables)# Have a look at the table:wines2007$data