4.2 Data: Sensory Profiles of Sausages
Overview:
Data: Sensory profiles of sausages (8 sausage brands, 8 panelists)
Rows: The 8 types of sausage (4 in each session), all values are in scale similar to a Likert-scale
Columns: 19 sensory attributes
Note: ‘epPCA’ from ExPosition only takes numerical values for analysis.
Load necessary packages:
library(readxl) #to read data the excel files
library(ggplot2) #to plot really pretty graphs
library(corrplot) #to assess correlation and make correlation plots
library(PerformanceAnalytics) #another cool package to look at correlation
library(PTCA4CATA) #amazing package from Dr. Abdi to do support works 4 analysis
library(data4PCCAR) #amazing package no.2 from Dr. Abdi to do PCA & CA
library(ExPosition) #package for PCA calculations
library(InPosition) #another package for PCA calculation that also include inference (BR, CI)
library(graphics) #default on in R. Just making sure. For fine-tunings
library(dplyr) #for data manipulations
library(tidyverse) #collection of vital packages
library(data.table) #for data manipulation
library(knitr) #to make nice Rmarkdown including neat html tables
library(kableExtra) #make scrollable tables
library(gridExtra)
require(ggplotify) #these 2 helps combine plots
Load data:
#use readxl to read from excel files
sausage.raw <- read_excel("Sausage Data.xlsx") #don't hard code location,
#just direct to data file by name as long as it is in the same folder
a <- kable(sausage.raw) #taking a peak at our data
scroll_box(a, width = "910px", height = "300px")
Panelist | Product | Session | Aroma impact | Flavor impact | Salty | Umami | Acidic | Bitter | Alliaceous | Animalic savory | Bloody | Floury | Dark meat | Eggy | Fatty | HVP | Juicy savory | Rubbery | Smokey | Spicy | White meat |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
XEL | Salchicha de Pavo Nutrideli | 1 | 4.0 | 6.0 | 3.0 | 4.0 | 1.0 | 0.0 | 2.5 | 2.0 | 5.0 | 1.5 | 3.0 | 1.0 | 2.1 | 2.0 | 4.0 | 4.0 | 3.0 | 3.0 | 5.0 |
LALO | Salchicha de Pavo Nutrideli | 1 | 5.0 | 8.0 | 2.5 | 4.0 | 2.0 | 0.0 | 3.0 | 1.0 | 2.0 | 3.0 | 2.2 | 3.0 | 4.0 | 2.0 | 4.0 | 4.0 | 4.5 | 2.0 | 5.0 |
JUAN | Salchicha de Pavo Nutrideli | 1 | 3.0 | 6.0 | 3.5 | 2.0 | 2.0 | 0.0 | 2.5 | 3.0 | 0.0 | 3.0 | 2.5 | 0.5 | 4.0 | 2.0 | 2.0 | 3.0 | 1.0 | 3.0 | 5.0 |
MARTHA | Salchicha de Pavo Nutrideli | 1 | 5.0 | 5.5 | 4.0 | 5.0 | 2.0 | 0.0 | 4.0 | 2.0 | 3.0 | 2.0 | 5.2 | 2.0 | 5.1 | 2.0 | 6.0 | 5.0 | 4.0 | 3.0 | 3.0 |
NERI | Salchicha de Pavo Nutrideli | 1 | 6.0 | 6.0 | 2.5 | 2.0 | 1.5 | 0.0 | 2.0 | 1.0 | 1.5 | 3.0 | 4.0 | 0.0 | 4.0 | 4.5 | 3.0 | 5.2 | 2.0 | 2.0 | 5.0 |
DIANA | Salchicha de Pavo Nutrideli | 1 | 6.0 | 7.0 | 5.5 | 4.5 | 2.5 | 0.0 | 3.5 | 5.0 | 2.0 | 4.0 | 4.0 | 2.0 | 5.1 | 2.0 | 2.5 | 3.0 | 3.5 | 7.0 | 6.0 |
DULCE | Salchicha de Pavo Nutrideli | 1 | 4.0 | 6.0 | 3.0 | 4.0 | 1.0 | 0.0 | 4.0 | 3.0 | 2.0 | 4.5 | 4.0 | 2.0 | 2.1 | 6.0 | 3.5 | 3.0 | 4.0 | 3.0 | 5.0 |
RAUL | Salchicha de Pavo Nutrideli | 1 | 3.0 | 9.0 | 5.0 | 1.0 | 2.0 | 0.0 | 3.0 | 4.0 | 3.0 | 1.5 | 3.5 | 3.0 | 2.1 | 3.0 | 4.0 | 2.2 | 2.0 | 3.0 | 6.0 |
XEL | Salchicha de pavo FUD | 1 | 3.0 | 5.0 | 3.0 | 2.0 | 2.0 | 3.0 | 2.0 | 2.0 | 3.9 | 2.0 | 2.0 | 3.0 | 2.0 | 2.0 | 1.0 | 4.0 | 4.0 | 3.0 | 5.0 |
LALO | Salchicha de pavo FUD | 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| 5.0 | 2.0 | 4.0 | 3.0 | 0.0 | 4.0 | 3.0 | 2.0 | 3.0 | 3.0 | 0.0 | 3.0 | 0.0 | 3.0 | 5.0 | 4.0 | 1.0 | 3.0 |
XEL | Salchicha Viena Nutrideli | 2 | 4.0 | 7.0 | 2.0 | 4.0 | 0.0 | 0.0 | 2.0 | 2.0 | 1.5 | 0.0 | 5.0 | 3.0 | 4.0 | 3.5 | 3.0 | 2.0 | 4.5 | 0.0 | 4.8 |
LALO | Salchicha Viena Nutrideli | 2 | 5.0 | 4.0 | 3.5 | 3.0 | 0.0 | 0.0 | 4.0 | 1.0 | 3.0 | 0.0 | 2.0 | 2.0 | 4.0 | 4.0 | 3.0 | 4.0 | 4.0 | 0.0 | 2.0 |
JUAN | Salchicha Viena Nutrideli | 2 | 4.0 | 8.0 | 3.0 | 1.5 | 0.0 | 0.0 | 2.0 | 4.0 | 1.5 | 0.0 | 4.0 | 2.0 | 3.0 | 0.0 | 5.0 | 2.0 | 3.0 | 0.0 | 3.0 |
MARTHA | Salchicha Viena Nutrideli | 2 | 3.0 | 8.0 | 2.0 | 5.0 | 0.0 | 0.0 | 3.5 | 1.0 | 0.0 | 0.0 | 4.0 | 1.0 | 4.0 | 1.0 | 3.0 | 2.0 | 1.0 | 0.0 | 1.8 |
NERI | Salchicha Viena Nutrideli | 2 | 3.0 | 5.0 | 3.0 | 4.0 | 0.0 | 0.0 | 2.0 | 2.0 | 2.5 | 0.0 | 4.0 | 3.0 | 2.5 | 2.0 | 3.0 | 2.0 | 3.0 | 0.0 | 4.8 |
DIANA | Salchicha Viena Nutrideli | 2 | 5.0 | 5.0 | 5.0 | 3.0 | 0.0 | 0.0 | 3.0 | 3.0 | 2.0 | 0.0 | 6.0 | 1.0 | 4.5 | 2.0 | 3.0 | 2.0 | 3.5 | 0.0 | 4.0 |
DULCE | Salchicha Viena Nutrideli | 2 | 6.0 | 6.0 | 2.0 | 1.0 | 0.0 | 0.0 | 2.0 | 4.5 | 1.0 | 0.0 | 5.5 | 0.5 | 3.0 | 2.0 | 4.0 | 3.0 | 2.0 | 0.0 | 4.0 |
RAUL | Salchicha Viena Nutrideli | 2 | 4.0 | 6.0 | 3.0 | 3.0 | 0.0 | 0.0 | 3.0 | 0.0 | 3.0 | 0.0 | 4.0 | 1.0 | 5.0 | 3.0 | 4.0 | 5.0 | 3.0 | 0.0 | 3.0 |
XEL | Salchicha viena FUD | 2 | 4.0 | 5.0 | 3.0 | 4.0 | 1.0 | 0.0 | 4.0 | 2.0 | 2.0 | 0.0 | 5.0 | 2.0 | 3.0 | 0.0 | 3.0 | 0.0 | 3.0 | 0.0 | 0.0 |
LALO | Salchicha viena FUD | 2 | 4.0 | 6.0 | 4.0 | 3.5 | 2.0 | 0.0 | 3.0 | 2.0 | 2.0 | 0.0 | 5.0 | 3.0 | 3.5 | 0.0 | 3.0 | 0.0 | 3.5 | 0.0 | 3.0 |
JUAN | Salchicha viena FUD | 2 | 5.0 | 8.0 | 2.0 | 3.0 | 1.5 | 0.0 | 3.0 | 2.5 | 2.0 | 0.0 | 5.0 | 3.5 | 3.0 | 0.0 | 5.0 | 0.0 | 3.0 | 0.0 | 2.0 |
MARTHA | Salchicha viena FUD | 2 | 4.0 | 6.0 | 2.0 | 5.0 | 1.0 | 0.0 | 3.0 | 4.0 | 1.0 | 0.0 | 3.0 | 0.0 | 3.0 | 0.0 | 4.0 | 0.0 | 3.0 | 0.0 | 2.0 |
NERI | Salchicha viena FUD | 2 | 7.0 | 8.0 | 2.5 | 2.0 | 2.5 | 0.0 | 2.0 | 1.5 | 3.0 | 0.0 | 6.0 | 0.0 | 4.0 | 0.0 | 1.5 | 0.0 | 3.0 | 0.0 | 3.0 |
DIANA | Salchicha viena FUD | 2 | 7.0 | 6.0 | 4.0 | 3.5 | 2.0 | 0.0 | 2.5 | 4.0 | 2.0 | 0.0 | 5.0 | 0.0 | 3.5 | 0.0 | 4.0 | 0.0 | 4.0 | 0.0 | 3.0 |
DULCE | Salchicha viena FUD | 2 |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2.0 | 4.0 |
NERI | SALCHICHA VIENA CHIMEX | 2 | 6.0 | 7.0 | 3.0 | 4.0 | 2.5 | 0.0 | 3.0 | 2.0 | 1.0 | 2.0 | 0.0 | 0.0 | 3.0 | 1.5 | 3.5 | 4.0 | 2.5 | 2.0 | 3.0 |
DIANA | SALCHICHA VIENA CHIMEX | 2 | 7.0 | 7.0 | 5.0 | 4.0 | 3.0 | 0.0 | 3.5 | 4.0 | 0.0 | 6.0 | 0.0 | 2.0 | 3.5 | 3.0 | 4.0 | 4.0 | 2.5 | 2.0 | 7.0 |
DULCE | SALCHICHA VIENA CHIMEX | 2 | 7.0 | 6.0 | 2.0 | 2.0 | 1.0 | 0.0 | 4.0 | 3.0 | 3.0 | 4.0 | 0.0 | 1.0 | 3.0 | 0.0 | 3.0 | 3.0 | 3.5 | 2.0 | 4.0 |
Convert to data.frame and show snippet of data
Data processing:
Goal is to make as many variations of data as needed. I prefer to work with data frame as it is easy to manipulate.Here I made 2 assumptions: 1. panelist ratings are independent of each others 2. session 1 and 2 are independent and has similar testing conditions.
Find means by product names and finalize: