setwd("/Volumes/GoogleDrive/Mi unidad/Agrosavia/Colaboraciones/Lucero/Tesis/data")
sensorial <- read.table("sensors.csv", header=T, sep=",")
sensorial$dia<-as.factor(sensorial$dia)
sensorial$gendia<-as.factor(sensorial$gendia)
attach(sensorial)
# Packages
library(vegan)
## Loading required package: permute
## Loading required package: lattice
## This is vegan 2.5-7
library(ggplot2)
library(concaveman)
library(ggforce)
# Data subsets by temperature ramp
senscurva1 <- subset(sensorial, sensorial$curva == "1")
senscurva2 <- subset(sensorial, sensorial$curva == "2")
senscurva3 <- subset(sensorial, sensorial$curva == "3")
# Seleccionando Curva 1
detach(sensorial)
attach(senscurva1)
# Generando la matriz general de perfil sensorial - extrayendo columnas con la información de sabor
sens = senscurva1[,6:ncol(senscurva1)]
# Convirtiendo las columnas extraidas en una matriz
m_sens=as.matrix(sens)
# Obteniendo las distancias Bray-Curtis de la matriz
set.seed(123)
nmds = metaMDS(m_sens, distance = "bray")
## Run 0 stress 0.1344322 
## Run 1 stress 0.1352544 
## Run 2 stress 0.1352543 
## Run 3 stress 0.1557937 
## Run 4 stress 0.1344322 
## ... New best solution
## ... Procrustes: rmse 0.0002495923  max resid 0.0006899008 
## ... Similar to previous best
## Run 5 stress 0.1435799 
## Run 6 stress 0.1435805 
## Run 7 stress 0.1352543 
## Run 8 stress 0.142616 
## Run 9 stress 0.1435805 
## Run 10 stress 0.1643082 
## Run 11 stress 0.1344323 
## ... Procrustes: rmse 7.093723e-05  max resid 0.0001891645 
## ... Similar to previous best
## Run 12 stress 0.1352542 
## Run 13 stress 0.142616 
## Run 14 stress 0.1352544 
## Run 15 stress 0.1643087 
## Run 16 stress 0.1352543 
## Run 17 stress 0.1352542 
## Run 18 stress 0.1344322 
## ... Procrustes: rmse 7.045732e-05  max resid 0.0001946775 
## ... Similar to previous best
## Run 19 stress 0.1352542 
## Run 20 stress 0.1517266 
## *** Solution reached
nmds
## 
## Call:
## metaMDS(comm = m_sens, distance = "bray") 
## 
## global Multidimensional Scaling using monoMDS
## 
## Data:     m_sens 
## Distance: bray 
## 
## Dimensions: 2 
## Stress:     0.1344322 
## Stress type 1, weak ties
## Two convergent solutions found after 20 tries
## Scaling: centring, PC rotation, halfchange scaling 
## Species: expanded scores based on 'm_sens'
# Generando el gráfico Non-Metric multidimensional scaling
plot(nmds)

# extrayendo los puntajes NMDS (coordenadas x and y)
data.scores = as.data.frame(scores(nmds))
# adicionando columnas al data frame 
data.scores$gen = senscurva1$gen
data.scores$dia = senscurva1$dia
data.scores$gendia = senscurva1$gendia
head(data.scores)
##         NMDS1       NMDS2    gen dia   gendia
## 1 -0.20920959  0.09422714 CCN 51   5 CCN 51_5
## 2  0.05377915 -0.07932617 CCN 51   5 CCN 51_5
## 3 -0.11367390  0.02441217 CCN 51   5 CCN 51_5
## 4 -0.04272649 -0.09682374 ICS 95   5 ICS 95_5
## 5  0.02218775 -0.04708223 ICS 95   5 ICS 95_5
## 6  0.03726757  0.05730263 ICS 95   5 ICS 95_5
data.scores$dia<-as.factor(data.scores$dia)
# Creando escala de color para graficar
cbp1 <- c("#999999", "#E69F00", "#56B4E9", "#009E73","#F0E442", "#0072B2", "#D55E00", "#CC79A7")
# Gráfica del análisis
xx = ggplot(data.scores, aes(x = NMDS1, y = NMDS2)) + 
  geom_point(size = 4, aes(shape = gen, colour = dia)) + 
  geom_mark_hull(concavity = 5,expand=0,radius=0,aes(fill=gen))+
  theme(axis.text.y = element_text(colour = "black", size = 12, face = "bold"), 
        axis.text.x = element_text(colour = "black", face = "bold", size = 12), 
        legend.text = element_text(size = 12, face ="bold", colour ="black"), 
        legend.position = "right", axis.title.y = element_text(face = "bold", size = 14), 
        axis.title.x = element_text(face = "bold", size = 14, colour = "black"), 
        legend.title = element_text(size = 14, colour = "black", face = "bold"), 
        panel.background = element_blank(), panel.border = element_rect(colour = "black", fill = NA, size = 1.2),
        legend.key=element_blank()) + 
  labs(x = "NMDS1", colour = "Día", y = "NMDS2", shape ="Genotipo", fill="Genotipo")  + 
  scale_colour_manual(values = cbp1)
xx

# Seleccionando Curva 2
detach(senscurva1)
attach(senscurva2)
# Generando la matriz general de perfil sensorial - extrayendo columnas con la información de sabor
sens = senscurva2[,6:ncol(senscurva2)]
# Convirtiendo las columnas extraidas en una matriz
m_sens=as.matrix(sens)
# Obteniendo las distancias Bray-Curtis de la matriz
set.seed(123)
nmds = metaMDS(m_sens, distance = "bray")
## Run 0 stress 0.1225971 
## Run 1 stress 0.1316511 
## Run 2 stress 0.1316514 
## Run 3 stress 0.1225973 
## ... Procrustes: rmse 0.0003376587  max resid 0.0007577101 
## ... Similar to previous best
## Run 4 stress 0.1261682 
## Run 5 stress 0.1300444 
## Run 6 stress 0.1225974 
## ... Procrustes: rmse 0.0003970981  max resid 0.0008917697 
## ... Similar to previous best
## Run 7 stress 0.1352429 
## Run 8 stress 0.1225972 
## ... Procrustes: rmse 0.0001868526  max resid 0.0004134671 
## ... Similar to previous best
## Run 9 stress 0.1225973 
## ... Procrustes: rmse 0.0002846071  max resid 0.0006350884 
## ... Similar to previous best
## Run 10 stress 0.130044 
## Run 11 stress 0.1229467 
## ... Procrustes: rmse 0.01056907  max resid 0.03286849 
## Run 12 stress 0.1296877 
## Run 13 stress 0.1335357 
## Run 14 stress 0.1225972 
## ... Procrustes: rmse 0.0002036979  max resid 0.0004589528 
## ... Similar to previous best
## Run 15 stress 0.1296879 
## Run 16 stress 0.1316512 
## Run 17 stress 0.1225972 
## ... Procrustes: rmse 0.0002146584  max resid 0.0004755761 
## ... Similar to previous best
## Run 18 stress 0.1300441 
## Run 19 stress 0.1435567 
## Run 20 stress 0.1225973 
## ... Procrustes: rmse 0.0003322521  max resid 0.0007433156 
## ... Similar to previous best
## *** Solution reached
nmds
## 
## Call:
## metaMDS(comm = m_sens, distance = "bray") 
## 
## global Multidimensional Scaling using monoMDS
## 
## Data:     m_sens 
## Distance: bray 
## 
## Dimensions: 2 
## Stress:     0.1225971 
## Stress type 1, weak ties
## Two convergent solutions found after 20 tries
## Scaling: centring, PC rotation, halfchange scaling 
## Species: expanded scores based on 'm_sens'
# Generando el gráfico Non-Metric multidimensional scaling
plot(nmds)

# extrayendo los puntajes NMDS (coordenadas x and y)
data.scores = as.data.frame(scores(nmds))
# adicionando columnas al data frame 
data.scores$gen = senscurva2$gen
data.scores$dia = senscurva2$dia
data.scores$gendia = senscurva2$gendia
head(data.scores)
##          NMDS1        NMDS2    gen dia   gendia
## 19 -0.08554926  0.032743069 CCN 51   5 CCN 51_5
## 20 -0.01779492 -0.072475612 CCN 51   5 CCN 51_5
## 21  0.01991807  0.003904825 CCN 51   5 CCN 51_5
## 22  0.03850237 -0.035068532 ICS 95   5 ICS 95_5
## 23 -0.03238702 -0.024122352 ICS 95   5 ICS 95_5
## 24 -0.01401242 -0.021692349 ICS 95   5 ICS 95_5
data.scores$dia<-as.factor(data.scores$dia)
# Creando escala de color para graficar
cbp1 <- c("#999999", "#E69F00", "#56B4E9", "#009E73","#F0E442", "#0072B2", "#D55E00", "#CC79A7")
# Gráfica del análisis
xx = ggplot(data.scores, aes(x = NMDS1, y = NMDS2)) + 
  geom_point(size = 4, aes(shape = gen, colour = dia)) + 
  geom_mark_hull(concavity = 5,expand=0,radius=0,aes(fill=gen))+
  theme(axis.text.y = element_text(colour = "black", size = 12, face = "bold"), 
        axis.text.x = element_text(colour = "black", face = "bold", size = 12), 
        legend.text = element_text(size = 12, face ="bold", colour ="black"), 
        legend.position = "right", axis.title.y = element_text(face = "bold", size = 14), 
        axis.title.x = element_text(face = "bold", size = 14, colour = "black"), 
        legend.title = element_text(size = 14, colour = "black", face = "bold"), 
        panel.background = element_blank(), panel.border = element_rect(colour = "black", fill = NA, size = 1.2),
        legend.key=element_blank()) + 
  labs(x = "NMDS1", colour = "Día", y = "NMDS2", shape ="Genotipo", fill="Genotipo")  + 
  scale_colour_manual(values = cbp1)
xx

# Seleccionando Curva 3
detach(senscurva2)
attach(senscurva3)
# Generando la matriz general de perfil sensorial - extrayendo columnas con la información de sabor
sens = senscurva3[,6:ncol(senscurva3)]
# Convirtiendo las columnas extraidas en una matriz
m_sens=as.matrix(sens)
# Obteniendo las distancias Bray-Curtis de la matriz
set.seed(123)
nmds = metaMDS(m_sens, distance = "bray")
## Run 0 stress 0.1147942 
## Run 1 stress 0.1147942 
## ... Procrustes: rmse 6.940025e-07  max resid 1.838944e-06 
## ... Similar to previous best
## Run 2 stress 0.1147942 
## ... Procrustes: rmse 4.950019e-06  max resid 1.701912e-05 
## ... Similar to previous best
## Run 3 stress 0.1147942 
## ... New best solution
## ... Procrustes: rmse 1.693478e-06  max resid 5.564547e-06 
## ... Similar to previous best
## Run 4 stress 0.1619049 
## Run 5 stress 0.1619049 
## Run 6 stress 0.1147942 
## ... Procrustes: rmse 2.827065e-06  max resid 9.628942e-06 
## ... Similar to previous best
## Run 7 stress 0.1147942 
## ... Procrustes: rmse 1.151125e-06  max resid 2.030255e-06 
## ... Similar to previous best
## Run 8 stress 0.1619049 
## Run 9 stress 0.1147942 
## ... Procrustes: rmse 1.902378e-06  max resid 6.382527e-06 
## ... Similar to previous best
## Run 10 stress 0.1147942 
## ... Procrustes: rmse 3.893125e-06  max resid 1.337285e-05 
## ... Similar to previous best
## Run 11 stress 0.1147942 
## ... Procrustes: rmse 6.171607e-06  max resid 2.119204e-05 
## ... Similar to previous best
## Run 12 stress 0.1147942 
## ... Procrustes: rmse 2.981592e-06  max resid 1.010976e-05 
## ... Similar to previous best
## Run 13 stress 0.185411 
## Run 14 stress 0.1147942 
## ... Procrustes: rmse 9.687729e-07  max resid 2.249469e-06 
## ... Similar to previous best
## Run 15 stress 0.1147942 
## ... New best solution
## ... Procrustes: rmse 6.719214e-07  max resid 1.242106e-06 
## ... Similar to previous best
## Run 16 stress 0.1147942 
## ... Procrustes: rmse 4.832258e-06  max resid 1.615926e-05 
## ... Similar to previous best
## Run 17 stress 0.1619049 
## Run 18 stress 0.1147942 
## ... Procrustes: rmse 1.880684e-06  max resid 3.000391e-06 
## ... Similar to previous best
## Run 19 stress 0.1619049 
## Run 20 stress 0.1147942 
## ... Procrustes: rmse 1.899445e-05  max resid 6.450898e-05 
## ... Similar to previous best
## *** Solution reached
nmds
## 
## Call:
## metaMDS(comm = m_sens, distance = "bray") 
## 
## global Multidimensional Scaling using monoMDS
## 
## Data:     m_sens 
## Distance: bray 
## 
## Dimensions: 2 
## Stress:     0.1147942 
## Stress type 1, weak ties
## Two convergent solutions found after 20 tries
## Scaling: centring, PC rotation, halfchange scaling 
## Species: expanded scores based on 'm_sens'
# Generando el gráfico Non-Metric multidimensional scaling
plot(nmds)

# extrayendo los puntajes NMDS (coordenadas x and y)
data.scores = as.data.frame(scores(nmds))
# adicionando columnas al data frame 
data.scores$gen = senscurva3$gen
data.scores$dia = senscurva3$dia
data.scores$gendia = senscurva3$gendia
head(data.scores)
##          NMDS1       NMDS2    gen dia   gendia
## 37 -0.01779964 -0.03712848 CCN 51   5 CCN 51_5
## 38 -0.06610923 -0.06507581 CCN 51   5 CCN 51_5
## 39 -0.11467651  0.13259633 CCN 51   5 CCN 51_5
## 40 -0.02970430  0.04043599 ICS 95   5 ICS 95_5
## 41 -0.23302701 -0.01260452 ICS 95   5 ICS 95_5
## 42 -0.09363593  0.01507214 ICS 95   5 ICS 95_5
data.scores$dia<-as.factor(data.scores$dia)
# Creando escala de color para graficar
cbp1 <- c("#999999", "#E69F00", "#56B4E9", "#009E73","#F0E442", "#0072B2", "#D55E00", "#CC79A7")
# Gráfica del análisis
xx = ggplot(data.scores, aes(x = NMDS1, y = NMDS2)) + 
  geom_point(size = 4, aes(shape = gen, colour = dia)) + 
  geom_mark_hull(concavity = 5,expand=0,radius=0,aes(fill=gen))+
  theme(axis.text.y = element_text(colour = "black", size = 12, face = "bold"), 
        axis.text.x = element_text(colour = "black", face = "bold", size = 12), 
        legend.text = element_text(size = 12, face ="bold", colour ="black"), 
        legend.position = "right", axis.title.y = element_text(face = "bold", size = 14), 
        axis.title.x = element_text(face = "bold", size = 14, colour = "black"), 
        legend.title = element_text(size = 14, colour = "black", face = "bold"), 
        panel.background = element_blank(), panel.border = element_rect(colour = "black", fill = NA, size = 1.2),
        legend.key=element_blank()) + 
  labs(x = "NMDS1", colour = "Día", y = "NMDS2", shape ="Genotipo", fill="Genotipo")  + 
  scale_colour_manual(values = cbp1)
xx

## Probando si el perfil del sabor es estadísticamente distinto basado en los grupos (genotipos, dia, genotipos*dia) para cada curva de temperatura
## Curva 1
detach(senscurva3)
attach(senscurva1)
# Generando la matriz de perfil sensorial para el tiempo a evaluar - extrayendo columnas con la información de sabor
sens = senscurva1[,6:ncol(senscurva1)]
# Convirtiendo las columnas extraidas en una matriz
m_sens=as.matrix(sens)
# Análisis de similaridad identificando las diferencias en el perfil de sabor según los grupos evaluados
anogen <- anosim(m_sens, gen, distance = "bray", permutations = 9999)
anogen
## 
## Call:
## anosim(x = m_sens, grouping = gen, permutations = 9999, distance = "bray") 
## Dissimilarity: bray 
## 
## ANOSIM statistic R: 0.5212 
##       Significance: 1e-04 
## 
## Permutation: free
## Number of permutations: 9999
anodia <- anosim(m_sens, dia, distance = "bray", permutations = 9999)
anodia
## 
## Call:
## anosim(x = m_sens, grouping = dia, permutations = 9999, distance = "bray") 
## Dissimilarity: bray 
## 
## ANOSIM statistic R: -0.05041 
##       Significance: 0.7451 
## 
## Permutation: free
## Number of permutations: 9999
anogendia <- anosim(m_sens, gendia, distance = "bray", permutations = 9999)
anogendia
## 
## Call:
## anosim(x = m_sens, grouping = gendia, permutations = 9999, distance = "bray") 
## Dissimilarity: bray 
## 
## ANOSIM statistic R: 0.421 
##       Significance: 7e-04 
## 
## Permutation: free
## Number of permutations: 9999
# PostHoc análisis de las diferencias cuantitativas del perfil de sabor entre las categorias de los grupos evaluados
library(pairwiseAdonis)
## Loading required package: cluster
pairwise.adonis2(m_sens ~ gen, data = senscurva1)
## $parent_call
## [1] "m_sens ~ gen , strata = Null , permutations 999"
## 
## $`CCN 51_vs_ICS 95`
##          Df SumOfSqs      R2      F Pr(>F)  
## gen       1 0.019147 0.22038 2.8267  0.033 *
## Residual 10 0.067736 0.77962                
## Total    11 0.086883 1.00000                
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## $`CCN 51_vs_TCS 01`
##          Df SumOfSqs     R2      F Pr(>F)   
## gen       1 0.066725 0.5004 10.016  0.004 **
## Residual 10 0.066619 0.4996                 
## Total    11 0.133344 1.0000                 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## $`ICS 95_vs_TCS 01`
##          Df SumOfSqs      R2      F Pr(>F)   
## gen       1 0.037838 0.47875 9.1848  0.005 **
## Residual 10 0.041197 0.52125                 
## Total    11 0.079035 1.00000                 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## attr(,"class")
## [1] "pwadstrata" "list"
pairwise.adonis2(m_sens ~ dia, data = senscurva1)
## $parent_call
## [1] "m_sens ~ dia , strata = Null , permutations 999"
## 
## $`5_vs_6`
##          Df SumOfSqs      R2      F Pr(>F)
## dia       1 0.002012 0.01182 0.1914  0.895
## Residual 16 0.168237 0.98818              
## Total    17 0.170249 1.00000              
## 
## attr(,"class")
## [1] "pwadstrata" "list"
pairwise.adonis2(m_sens ~ gendia, data = senscurva1)
## 'nperm' >= set of all permutations: complete enumeration.
## Set of permutations < 'minperm'. Generating entire set.
## 'nperm' >= set of all permutations: complete enumeration.
## Set of permutations < 'minperm'. Generating entire set.
## 'nperm' >= set of all permutations: complete enumeration.
## Set of permutations < 'minperm'. Generating entire set.
## 'nperm' >= set of all permutations: complete enumeration.
## Set of permutations < 'minperm'. Generating entire set.
## 'nperm' >= set of all permutations: complete enumeration.
## Set of permutations < 'minperm'. Generating entire set.
## 'nperm' >= set of all permutations: complete enumeration.
## Set of permutations < 'minperm'. Generating entire set.
## 'nperm' >= set of all permutations: complete enumeration.
## Set of permutations < 'minperm'. Generating entire set.
## 'nperm' >= set of all permutations: complete enumeration.
## Set of permutations < 'minperm'. Generating entire set.
## 'nperm' >= set of all permutations: complete enumeration.
## Set of permutations < 'minperm'. Generating entire set.
## 'nperm' >= set of all permutations: complete enumeration.
## Set of permutations < 'minperm'. Generating entire set.
## 'nperm' >= set of all permutations: complete enumeration.
## Set of permutations < 'minperm'. Generating entire set.
## 'nperm' >= set of all permutations: complete enumeration.
## Set of permutations < 'minperm'. Generating entire set.
## 'nperm' >= set of all permutations: complete enumeration.
## Set of permutations < 'minperm'. Generating entire set.
## 'nperm' >= set of all permutations: complete enumeration.
## Set of permutations < 'minperm'. Generating entire set.
## 'nperm' >= set of all permutations: complete enumeration.
## Set of permutations < 'minperm'. Generating entire set.
## $parent_call
## [1] "m_sens ~ gendia , strata = Null , permutations 999"
## 
## $`CCN 51_5_vs_ICS 95_5`
##          Df SumOfSqs      R2      F Pr(>F)
## gendia    1 0.006190 0.17951 0.8751    0.5
## Residual  4 0.028295 0.82049              
## Total     5 0.034485 1.00000              
## 
## $`CCN 51_5_vs_TCS 01_5`
##          Df SumOfSqs      R2      F Pr(>F)
## gendia    1 0.027729 0.53555 4.6123    0.1
## Residual  4 0.024048 0.46445              
## Total     5 0.051777 1.00000              
## 
## $`CCN 51_5_vs_CCN 51_6`
##          Df SumOfSqs     R2      F Pr(>F)
## gendia    1 0.006158 0.1322 0.6094    0.6
## Residual  4 0.040421 0.8678              
## Total     5 0.046579 1.0000              
## 
## $`CCN 51_5_vs_ICS 95_6`
##          Df SumOfSqs      R2      F Pr(>F)
## gendia    1 0.010943 0.27419 1.5111    0.3
## Residual  4 0.028968 0.72581              
## Total     5 0.039912 1.00000              
## 
## $`CCN 51_5_vs_TCS 01_6`
##          Df SumOfSqs      R2      F Pr(>F)
## gendia    1 0.031153 0.45936 3.3987    0.1
## Residual  4 0.036665 0.54064              
## Total     5 0.067818 1.00000              
## 
## $`ICS 95_5_vs_TCS 01_5`
##          Df  SumOfSqs      R2      F Pr(>F)
## gendia    1 0.0117343 0.59818 5.9548    0.1
## Residual  4 0.0078823 0.40182              
## Total     5 0.0196166 1.00000              
## 
## $`ICS 95_5_vs_CCN 51_6`
##          Df SumOfSqs      R2      F Pr(>F)
## gendia    1 0.016605 0.40639 2.7384    0.1
## Residual  4 0.024256 0.59361              
## Total     5 0.040861 1.00000              
## 
## $`ICS 95_5_vs_ICS 95_6`
##          Df  SumOfSqs      R2      F Pr(>F)
## gendia    1 0.0083543 0.39488 2.6102    0.1
## Residual  4 0.0128025 0.60512              
## Total     5 0.0211568 1.00000              
## 
## $`ICS 95_5_vs_TCS 01_6`
##          Df SumOfSqs     R2      F Pr(>F)
## gendia    1 0.019862 0.4921 3.8756    0.1
## Residual  4 0.020499 0.5079              
## Total     5 0.040361 1.0000              
## 
## $`TCS 01_5_vs_CCN 51_6`
##          Df SumOfSqs      R2     F Pr(>F)
## gendia    1 0.037146 0.64992 7.426    0.1
## Residual  4 0.020009 0.35008             
## Total     5 0.057155 1.00000             
## 
## $`TCS 01_5_vs_ICS 95_6`
##          Df  SumOfSqs      R2     F Pr(>F)
## gendia    1 0.0201683 0.70214 9.429    0.1
## Residual  4 0.0085558 0.29786             
## Total     5 0.0287241 1.00000             
## 
## $`TCS 01_5_vs_TCS 01_6`
##          Df  SumOfSqs      R2      F Pr(>F)
## gendia    1 0.0037873 0.18899 0.9321    0.6
## Residual  4 0.0162526 0.81101              
## Total     5 0.0200399 1.00000              
## 
## $`CCN 51_6_vs_ICS 95_6`
##          Df SumOfSqs      R2      F Pr(>F)
## gendia    1 0.019067 0.43338 3.0594    0.1
## Residual  4 0.024929 0.56662              
## Total     5 0.043996 1.00000              
## 
## $`CCN 51_6_vs_TCS 01_6`
##          Df SumOfSqs      R2      F Pr(>F)
## gendia    1 0.047366 0.59214 5.8072    0.1
## Residual  4 0.032626 0.40786              
## Total     5 0.079992 1.00000              
## 
## $`ICS 95_6_vs_TCS 01_6`
##          Df SumOfSqs      R2      F Pr(>F)
## gendia    1 0.036054 0.63002 6.8114    0.1
## Residual  4 0.021173 0.36998              
## Total     5 0.057227 1.00000              
## 
## attr(,"class")
## [1] "pwadstrata" "list"
detach(senscurva1)

## Curva 2
attach(senscurva2)
# Generando la matriz de perfil sensorial para el tiempo a evaluar - extrayendo columnas con la información de sabor
sens = senscurva2[,6:ncol(senscurva2)]
# Convirtiendo las columnas extraidas en una matriz
m_sens=as.matrix(sens)
# Análisis de similaridad identificando las diferencias en el perfil de sabor según los grupos evaluados
anogen <- anosim(m_sens, gen, distance = "bray", permutations = 9999)
anogen
## 
## Call:
## anosim(x = m_sens, grouping = gen, permutations = 9999, distance = "bray") 
## Dissimilarity: bray 
## 
## ANOSIM statistic R: 0.1327 
##       Significance: 0.0427 
## 
## Permutation: free
## Number of permutations: 9999
anodia <- anosim(m_sens, dia, distance = "bray", permutations = 9999)
anodia
## 
## Call:
## anosim(x = m_sens, grouping = dia, permutations = 9999, distance = "bray") 
## Dissimilarity: bray 
## 
## ANOSIM statistic R: 0.01818 
##       Significance: 0.3444 
## 
## Permutation: free
## Number of permutations: 9999
anogendia <- anosim(m_sens, gendia, distance = "bray", permutations = 9999)
anogendia
## 
## Call:
## anosim(x = m_sens, grouping = gendia, permutations = 9999, distance = "bray") 
## Dissimilarity: bray 
## 
## ANOSIM statistic R: 0.2642 
##       Significance: 0.0073 
## 
## Permutation: free
## Number of permutations: 9999
# PostHoc análisis de las diferencias cuantitativas del perfil de sabor entre las categorias de los grupos evaluados
library(pairwiseAdonis)
pairwise.adonis2(m_sens ~ gen, data = senscurva2)
## $parent_call
## [1] "m_sens ~ gen , strata = Null , permutations 999"
## 
## $`CCN 51_vs_ICS 95`
##          Df SumOfSqs      R2      F Pr(>F)  
## gen       1 0.025351 0.19806 2.4697   0.04 *
## Residual 10 0.102646 0.80194                
## Total    11 0.127997 1.00000                
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## $`CCN 51_vs_TCS 01`
##          Df SumOfSqs      R2      F Pr(>F)
## gen       1 0.003478 0.06125 0.6525  0.633
## Residual 10 0.053294 0.93875              
## Total    11 0.056771 1.00000              
## 
## $`ICS 95_vs_TCS 01`
##          Df SumOfSqs      R2     F Pr(>F)  
## gen       1 0.018759 0.17074 2.059  0.073 .
## Residual 10 0.091108 0.82926               
## Total    11 0.109867 1.00000               
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## attr(,"class")
## [1] "pwadstrata" "list"
pairwise.adonis2(m_sens ~ dia, data = senscurva2)
## $parent_call
## [1] "m_sens ~ dia , strata = Null , permutations 999"
## 
## $`5_vs_6`
##          Df SumOfSqs      R2      F Pr(>F)
## dia       1 0.011864 0.07642 1.3239  0.306
## Residual 16 0.143384 0.92358              
## Total    17 0.155249 1.00000              
## 
## attr(,"class")
## [1] "pwadstrata" "list"
pairwise.adonis2(m_sens ~ gendia, data = senscurva2)
## 'nperm' >= set of all permutations: complete enumeration.
## Set of permutations < 'minperm'. Generating entire set.
## 'nperm' >= set of all permutations: complete enumeration.
## Set of permutations < 'minperm'. Generating entire set.
## 'nperm' >= set of all permutations: complete enumeration.
## Set of permutations < 'minperm'. Generating entire set.
## 'nperm' >= set of all permutations: complete enumeration.
## Set of permutations < 'minperm'. Generating entire set.
## 'nperm' >= set of all permutations: complete enumeration.
## Set of permutations < 'minperm'. Generating entire set.
## 'nperm' >= set of all permutations: complete enumeration.
## Set of permutations < 'minperm'. Generating entire set.
## 'nperm' >= set of all permutations: complete enumeration.
## Set of permutations < 'minperm'. Generating entire set.
## 'nperm' >= set of all permutations: complete enumeration.
## Set of permutations < 'minperm'. Generating entire set.
## 'nperm' >= set of all permutations: complete enumeration.
## Set of permutations < 'minperm'. Generating entire set.
## 'nperm' >= set of all permutations: complete enumeration.
## Set of permutations < 'minperm'. Generating entire set.
## 'nperm' >= set of all permutations: complete enumeration.
## Set of permutations < 'minperm'. Generating entire set.
## 'nperm' >= set of all permutations: complete enumeration.
## Set of permutations < 'minperm'. Generating entire set.
## 'nperm' >= set of all permutations: complete enumeration.
## Set of permutations < 'minperm'. Generating entire set.
## 'nperm' >= set of all permutations: complete enumeration.
## Set of permutations < 'minperm'. Generating entire set.
## 'nperm' >= set of all permutations: complete enumeration.
## Set of permutations < 'minperm'. Generating entire set.
## $parent_call
## [1] "m_sens ~ gendia , strata = Null , permutations 999"
## 
## $`CCN 51_5_vs_ICS 95_5`
##          Df  SumOfSqs      R2      F Pr(>F)
## gendia    1 0.0059964 0.22563 1.1655    0.4
## Residual  4 0.0205797 0.77437              
## Total     5 0.0265760 1.00000              
## 
## $`CCN 51_5_vs_TCS 01_5`
##          Df  SumOfSqs      R2      F Pr(>F)
## gendia    1 0.0056713 0.21765 1.1128    0.5
## Residual  4 0.0203861 0.78235              
## Total     5 0.0260574 1.00000              
## 
## $`CCN 51_5_vs_CCN 51_6`
##          Df SumOfSqs      R2      F Pr(>F)
## gendia    1 0.007472 0.23051 1.1982    0.3
## Residual  4 0.024944 0.76949              
## Total     5 0.032416 1.00000              
## 
## $`CCN 51_5_vs_ICS 95_6`
##          Df SumOfSqs      R2      F Pr(>F)
## gendia    1 0.021208 0.29555 1.6782    0.3
## Residual  4 0.050548 0.70445              
## Total     5 0.071756 1.00000              
## 
## $`CCN 51_5_vs_TCS 01_6`
##          Df  SumOfSqs      R2     F Pr(>F)
## gendia    1 0.0036779 0.12626 0.578    0.7
## Residual  4 0.0254509 0.87374             
## Total     5 0.0291288 1.00000             
## 
## $`ICS 95_5_vs_TCS 01_5`
##          Df  SumOfSqs      R2      F Pr(>F)
## gendia    1 0.0086295 0.47428 3.6086    0.1
## Residual  4 0.0095656 0.52572              
## Total     5 0.0181951 1.00000              
## 
## $`ICS 95_5_vs_CCN 51_6`
##          Df SumOfSqs      R2      F Pr(>F)
## gendia    1 0.020489 0.59196 5.8029    0.1
## Residual  4 0.014123 0.40804              
## Total     5 0.034613 1.00000              
## 
## $`ICS 95_5_vs_ICS 95_6`
##          Df SumOfSqs      R2      F Pr(>F)
## gendia    1 0.030502 0.43432 3.0712    0.1
## Residual  4 0.039728 0.56568              
## Total     5 0.070230 1.00000              
## 
## $`ICS 95_5_vs_TCS 01_6`
##          Df  SumOfSqs      R2      F Pr(>F)
## gendia    1 0.0060212 0.29156 1.6462    0.3
## Residual  4 0.0146304 0.70844              
## Total     5 0.0206516 1.00000              
## 
## $`TCS 01_5_vs_CCN 51_6`
##          Df  SumOfSqs      R2      F Pr(>F)
## gendia    1 0.0014235 0.09272 0.4088    0.9
## Residual  4 0.0139299 0.90728              
## Total     5 0.0153534 1.00000              
## 
## $`TCS 01_5_vs_ICS 95_6`
##          Df SumOfSqs      R2      F Pr(>F)
## gendia    1 0.034772 0.46796 3.5182    0.1
## Residual  4 0.039534 0.53204              
## Total     5 0.074306 1.00000              
## 
## $`TCS 01_5_vs_TCS 01_6`
##          Df  SumOfSqs     R2      F Pr(>F)
## gendia    1 0.0064408 0.3085 1.7845    0.3
## Residual  4 0.0144368 0.6915              
## Total     5 0.0208776 1.0000              
## 
## $`CCN 51_6_vs_ICS 95_6`
##          Df SumOfSqs      R2     F Pr(>F)
## gendia    1 0.040983 0.48173 3.718    0.1
## Residual  4 0.044092 0.51827             
## Total     5 0.085075 1.00000             
## 
## $`CCN 51_6_vs_TCS 01_6`
##          Df SumOfSqs      R2      F Pr(>F)
## gendia    1 0.010095 0.34704 2.1259    0.1
## Residual  4 0.018995 0.65296              
## Total     5 0.029090 1.00000              
## 
## $`ICS 95_6_vs_TCS 01_6`
##          Df SumOfSqs      R2      F Pr(>F)
## gendia    1 0.025038 0.35955 2.2456    0.1
## Residual  4 0.044599 0.64045              
## Total     5 0.069637 1.00000              
## 
## attr(,"class")
## [1] "pwadstrata" "list"
detach(senscurva2)

## Curva 3
attach(senscurva3)
# Generando la matriz de perfil sensorial para el tiempo a evaluar - extrayendo columnas con la información de sabor
sens = senscurva3[,6:ncol(senscurva3)]
# Convirtiendo las columnas extraidas en una matriz
m_sens=as.matrix(sens)
# Análisis de similaridad identificando las diferencias en el perfil de sabor según los grupos evaluados
anogen <- anosim(m_sens, gen, distance = "bray", permutations = 9999)
anogen
## 
## Call:
## anosim(x = m_sens, grouping = gen, permutations = 9999, distance = "bray") 
## Dissimilarity: bray 
## 
## ANOSIM statistic R: 0.3025 
##       Significance: 0.0024 
## 
## Permutation: free
## Number of permutations: 9999
anodia <- anosim(m_sens, dia, distance = "bray", permutations = 9999)
anodia
## 
## Call:
## anosim(x = m_sens, grouping = dia, permutations = 9999, distance = "bray") 
## Dissimilarity: bray 
## 
## ANOSIM statistic R: 0.01355 
##       Significance: 0.3456 
## 
## Permutation: free
## Number of permutations: 9999
anogendia <- anosim(m_sens, gendia, distance = "bray", permutations = 9999)
anogendia
## 
## Call:
## anosim(x = m_sens, grouping = gendia, permutations = 9999, distance = "bray") 
## Dissimilarity: bray 
## 
## ANOSIM statistic R: 0.3391 
##       Significance: 0.0041 
## 
## Permutation: free
## Number of permutations: 9999
# PostHoc análisis de las diferencias cuantitativas del perfil de sabor entre las categorias de los grupos evaluados
library(pairwiseAdonis)
pairwise.adonis2(m_sens ~ gen, data = senscurva3)
## $parent_call
## [1] "m_sens ~ gen , strata = Null , permutations 999"
## 
## $`CCN 51_vs_ICS 95`
##          Df SumOfSqs      R2      F Pr(>F)
## gen       1 0.003102 0.04985 0.5246  0.723
## Residual 10 0.059124 0.95015              
## Total    11 0.062226 1.00000              
## 
## $`CCN 51_vs_TCS 01`
##          Df SumOfSqs      R2      F Pr(>F)   
## gen       1 0.044901 0.36321 5.7037  0.004 **
## Residual 10 0.078724 0.63679                 
## Total    11 0.123625 1.00000                 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## $`ICS 95_vs_TCS 01`
##          Df SumOfSqs      R2      F Pr(>F)  
## gen       1 0.046158 0.33625 5.0659  0.015 *
## Residual 10 0.091114 0.66375                
## Total    11 0.137272 1.00000                
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## attr(,"class")
## [1] "pwadstrata" "list"
pairwise.adonis2(m_sens ~ dia, data = senscurva3)
## $parent_call
## [1] "m_sens ~ dia , strata = Null , permutations 999"
## 
## $`5_vs_6`
##          Df SumOfSqs      R2      F Pr(>F)
## dia       1 0.008405 0.04742 0.7965  0.504
## Residual 16 0.168850 0.95258              
## Total    17 0.177255 1.00000              
## 
## attr(,"class")
## [1] "pwadstrata" "list"
pairwise.adonis2(m_sens ~ gendia, data = senscurva3)
## 'nperm' >= set of all permutations: complete enumeration.
## Set of permutations < 'minperm'. Generating entire set.
## 'nperm' >= set of all permutations: complete enumeration.
## Set of permutations < 'minperm'. Generating entire set.
## 'nperm' >= set of all permutations: complete enumeration.
## Set of permutations < 'minperm'. Generating entire set.
## 'nperm' >= set of all permutations: complete enumeration.
## Set of permutations < 'minperm'. Generating entire set.
## 'nperm' >= set of all permutations: complete enumeration.
## Set of permutations < 'minperm'. Generating entire set.
## 'nperm' >= set of all permutations: complete enumeration.
## Set of permutations < 'minperm'. Generating entire set.
## 'nperm' >= set of all permutations: complete enumeration.
## Set of permutations < 'minperm'. Generating entire set.
## 'nperm' >= set of all permutations: complete enumeration.
## Set of permutations < 'minperm'. Generating entire set.
## 'nperm' >= set of all permutations: complete enumeration.
## Set of permutations < 'minperm'. Generating entire set.
## 'nperm' >= set of all permutations: complete enumeration.
## Set of permutations < 'minperm'. Generating entire set.
## 'nperm' >= set of all permutations: complete enumeration.
## Set of permutations < 'minperm'. Generating entire set.
## 'nperm' >= set of all permutations: complete enumeration.
## Set of permutations < 'minperm'. Generating entire set.
## 'nperm' >= set of all permutations: complete enumeration.
## Set of permutations < 'minperm'. Generating entire set.
## 'nperm' >= set of all permutations: complete enumeration.
## Set of permutations < 'minperm'. Generating entire set.
## 'nperm' >= set of all permutations: complete enumeration.
## Set of permutations < 'minperm'. Generating entire set.
## $parent_call
## [1] "m_sens ~ gendia , strata = Null , permutations 999"
## 
## $`CCN 51_5_vs_ICS 95_5`
##          Df  SumOfSqs      R2      F Pr(>F)
## gendia    1 0.0035916 0.14586 0.6831    0.8
## Residual  4 0.0210327 0.85414              
## Total     5 0.0246243 1.00000              
## 
## $`CCN 51_5_vs_TCS 01_5`
##          Df SumOfSqs      R2      F Pr(>F)
## gendia    1 0.046679 0.69067 8.9313    0.1
## Residual  4 0.020906 0.30933              
## Total     5 0.067584 1.00000              
## 
## $`CCN 51_5_vs_CCN 51_6`
##          Df  SumOfSqs      R2      F Pr(>F)
## gendia    1 0.0089622 0.38354 2.4887    0.1
## Residual  4 0.0144047 0.61646              
## Total     5 0.0233669 1.00000              
## 
## $`CCN 51_5_vs_ICS 95_6`
##          Df  SumOfSqs      R2      F Pr(>F)
## gendia    1 0.0055624 0.17707 0.8607    0.6
## Residual  4 0.0258521 0.82293              
## Total     5 0.0314145 1.00000              
## 
## $`CCN 51_5_vs_TCS 01_6`
##          Df SumOfSqs      R2      F Pr(>F)
## gendia    1 0.016031 0.35584 2.2096    0.2
## Residual  4 0.029020 0.64416              
## Total     5 0.045051 1.00000              
## 
## $`ICS 95_5_vs_TCS 01_5`
##          Df SumOfSqs      R2      F Pr(>F)
## gendia    1 0.052950 0.67376 8.2609    0.1
## Residual  4 0.025639 0.32624              
## Total     5 0.078588 1.00000              
## 
## $`ICS 95_5_vs_CCN 51_6`
##          Df  SumOfSqs     R2      F Pr(>F)
## gendia    1 0.0060601 0.2405 1.2666    0.4
## Residual  4 0.0191376 0.7595              
## Total     5 0.0251977 1.0000              
## 
## $`ICS 95_5_vs_ICS 95_6`
##          Df SumOfSqs      R2      F Pr(>F)
## gendia    1 0.005173 0.14466 0.6765    0.7
## Residual  4 0.030585 0.85534              
## Total     5 0.035758 1.00000              
## 
## $`ICS 95_5_vs_TCS 01_6`
##          Df SumOfSqs      R2      F Pr(>F)
## gendia    1 0.024180 0.41737 2.8655    0.1
## Residual  4 0.033753 0.58263              
## Total     5 0.057933 1.00000              
## 
## $`TCS 01_5_vs_CCN 51_6`
##          Df SumOfSqs      R2      F Pr(>F)
## gendia    1 0.040013 0.67792 8.4192    0.1
## Residual  4 0.019011 0.32208              
## Total     5 0.059024 1.00000              
## 
## $`TCS 01_5_vs_ICS 95_6`
##          Df SumOfSqs      R2      F Pr(>F)
## gendia    1 0.032855 0.51893 4.3148    0.1
## Residual  4 0.030458 0.48107              
## Total     5 0.063313 1.00000              
## 
## $`TCS 01_5_vs_TCS 01_6`
##          Df SumOfSqs      R2     F Pr(>F)
## gendia    1 0.021731 0.39256 2.585    0.2
## Residual  4 0.033626 0.60744             
## Total     5 0.055357 1.00000             
## 
## $`CCN 51_6_vs_ICS 95_6`
##          Df  SumOfSqs      R2      F Pr(>F)
## gendia    1 0.0051244 0.17621 0.8556    0.7
## Residual  4 0.0239570 0.82379              
## Total     5 0.0290814 1.00000              
## 
## $`CCN 51_6_vs_TCS 01_6`
##          Df SumOfSqs      R2      F Pr(>F)
## gendia    1 0.017773 0.39585 2.6208    0.2
## Residual  4 0.027125 0.60415              
## Total     5 0.044898 1.00000              
## 
## $`ICS 95_6_vs_TCS 01_6`
##          Df SumOfSqs      R2      F Pr(>F)
## gendia    1 0.009234 0.19316 0.9576    0.6
## Residual  4 0.038573 0.80684              
## Total     5 0.047807 1.00000              
## 
## attr(,"class")
## [1] "pwadstrata" "list"
detach(senscurva3)

## Análisis de sabor indicador: este análisis permite identificar el sabor que es encontrado más a menudo 
## en una categoría (nivel) de un grupo comparado con otro para todos los grupos analizados (genotipos, dia, genotipos*dia) en cada curva de temperatura 
library(indicspecies)
## Curva 1
attach(senscurva1)
# Generando la matriz de perfil sensorial para el tiempo a evaluar - extrayendo columnas con la información de sabor
sens = senscurva1[,6:ncol(senscurva1)]
# Convirtiendo las columnas extraidas en una matriz
m_sens=as.matrix(sens)
## Análisis de sabor indicador
invgen <- multipatt(m_sens, gen, func = "r.g", control = how(nperm=9999), duleg = T)
summary(invgen, alpha = 1)
## 
##  Multilevel pattern analysis
##  ---------------------------
## 
##  Association function: r.g
##  Significance level (alpha): 1
## 
##  Total number of species: 13
##  Selected number of species: 12 
##  Number of species associated to 1 group: 12 
##  Number of species associated to 2 groups: 0 
## 
##  List of species associated to each combination: 
## 
##  Group CCN 51  #sps.  4 
##              stat p.value
## violeta     0.403   0.354
## acido       0.333   0.531
## verde       0.277   0.685
## astringente 0.204   0.884
## 
##  Group ICS 95  #sps.  2 
##          stat p.value  
## amargo  0.588   0.035 *
## humedad 0.316   0.739  
## 
##  Group TCS 01  #sps.  6 
##               stat p.value   
## frutal       0.750  0.0138 * 
## frutos.secos 0.689  0.0013 **
## floral       0.686  0.0099 **
## dulce        0.670  0.0074 **
## cacao        0.617  0.0249 * 
## herbal       0.369  0.4339   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
invdia <- multipatt(m_sens, dia, func = "r.g", control = how(nperm=9999), duleg = T)
summary(invdia, alpha = 1)
## 
##  Multilevel pattern analysis
##  ---------------------------
## 
##  Association function: r.g
##  Significance level (alpha): 1
## 
##  Total number of species: 13
##  Selected number of species: 12 
##  Number of species associated to 1 group: 12 
## 
##  List of species associated to each combination: 
## 
##  Group 5  #sps.  6 
##               stat p.value
## frutal       0.236   0.615
## astringente  0.192   0.686
## frutos.secos 0.103   0.838
## amargo       0.092   1.000
## cacao        0.073   1.000
## dulce        0.000   1.000
## 
##  Group 6  #sps.  6 
##          stat p.value
## humedad 0.447   0.206
## violeta 0.342   0.332
## acido   0.282   0.442
## verde   0.196   0.690
## floral  0.081   1.000
## herbal  0.000   1.000
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
invgendia <- multipatt(m_sens, gendia, func = "r.g", control = how(nperm=9999), duleg = T)
summary(invgendia, alpha = 1)
## 
##  Multilevel pattern analysis
##  ---------------------------
## 
##  Association function: r.g
##  Significance level (alpha): 1
## 
##  Total number of species: 13
##  Selected number of species: 12 
##  Number of species associated to 1 group: 12 
##  Number of species associated to 2 groups: 0 
##  Number of species associated to 3 groups: 0 
##  Number of species associated to 4 groups: 0 
##  Number of species associated to 5 groups: 0 
## 
##  List of species associated to each combination: 
## 
##  Group CCN 51_5  #sps.  1 
##              stat p.value
## astringente 0.258   0.987
## 
##  Group CCN 51_6  #sps.  3 
##          stat p.value
## violeta 0.561   0.253
## verde   0.439   0.528
## acido   0.210   1.000
## 
##  Group ICS 95_5  #sps.  1 
##         stat p.value
## amargo 0.372   0.708
## 
##  Group ICS 95_6  #sps.  1 
##         stat p.value
## humedad  0.6   0.341
## 
##  Group TCS 01_5  #sps.  2 
##         stat p.value
## frutal 0.632   0.146
## cacao  0.488   0.252
## 
##  Group TCS 01_6  #sps.  4 
##               stat p.value  
## floral       0.542  0.1424  
## dulce        0.522  0.2021  
## frutos.secos 0.505  0.0728 .
## herbal       0.373  0.7824  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
detach(senscurva1)

## Curva 2
attach(senscurva2)
# Generando la matriz de perfil sensorial para el tiempo a evaluar - extrayendo columnas con la información de sabor
sens = senscurva2[,6:ncol(senscurva2)]
# Convirtiendo las columnas extraidas en una matriz
m_sens=as.matrix(sens)
## Análisis de sabor indicador
invgen <- multipatt(m_sens, gen, func = "r.g", control = how(nperm=9999), duleg = T)
summary(invgen, alpha = 1)
## 
##  Multilevel pattern analysis
##  ---------------------------
## 
##  Association function: r.g
##  Significance level (alpha): 1
## 
##  Total number of species: 13
##  Selected number of species: 13 
##  Number of species associated to 1 group: 13 
##  Number of species associated to 2 groups: 0 
## 
##  List of species associated to each combination: 
## 
##  Group CCN 51  #sps.  5 
##              stat p.value  
## acido       0.612  0.0362 *
## floral      0.500  0.1197  
## dulce       0.369  0.4271  
## astringente 0.322  0.5732  
## frutal      0.316  0.7298  
## 
##  Group ICS 95  #sps.  4 
##          stat p.value
## rancio  0.343   1.000
## humedad 0.290   0.594
## verde   0.236   0.835
## herbal  0.158   0.930
## 
##  Group TCS 01  #sps.  4 
##               stat p.value
## violeta      0.316   0.735
## frutos.secos 0.302   0.561
## cacao        0.283   0.561
## amargo       0.236   0.850
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
invdia <- multipatt(m_sens, dia, func = "r.g", control = how(nperm=9999), duleg = T)
summary(invdia, alpha = 1)
## 
##  Multilevel pattern analysis
##  ---------------------------
## 
##  Association function: r.g
##  Significance level (alpha): 1
## 
##  Total number of species: 13
##  Selected number of species: 13 
##  Number of species associated to 1 group: 13 
## 
##  List of species associated to each combination: 
## 
##  Group 5  #sps.  9 
##               stat p.value
## herbal       0.447   0.124
## frutal       0.447   0.215
## dulce        0.209   0.680
## cacao        0.200   0.590
## acido        0.192   0.697
## floral       0.177   0.722
## amargo       0.111   1.000
## verde        0.111   1.000
## frutos.secos 0.085   1.000
## 
##  Group 6  #sps.  4 
##              stat p.value
## astringente 0.342   0.333
## rancio      0.243   1.000
## violeta     0.149   1.000
## humedad     0.082   1.000
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
invgendia <- multipatt(m_sens, gendia, func = "r.g", control = how(nperm=9999), duleg = T)
summary(invgendia, alpha = 1)
## 
##  Multilevel pattern analysis
##  ---------------------------
## 
##  Association function: r.g
##  Significance level (alpha): 1
## 
##  Total number of species: 13
##  Selected number of species: 13 
##  Number of species associated to 1 group: 13 
##  Number of species associated to 2 groups: 0 
##  Number of species associated to 3 groups: 0 
##  Number of species associated to 4 groups: 0 
##  Number of species associated to 5 groups: 0 
## 
##  List of species associated to each combination: 
## 
##  Group CCN 51_5  #sps.  1 
##        stat p.value
## verde 0.149       1
## 
##  Group CCN 51_6  #sps.  5 
##               stat p.value
## floral       0.553   0.146
## acido        0.516   0.267
## dulce        0.373   0.779
## frutos.secos 0.191   1.000
## amargo       0.149   1.000
## 
##  Group ICS 95_5  #sps.  2 
##        stat p.value
## herbal  0.6   0.109
## frutal  0.2   1.000
## 
##  Group ICS 95_6  #sps.  2 
##          stat p.value
## rancio  0.542       1
## humedad 0.183       1
## 
##  Group TCS 01_5  #sps.  1 
##        stat p.value
## cacao 0.268   0.928
## 
##  Group TCS 01_6  #sps.  2 
##              stat p.value
## astringente 0.357    0.86
## violeta     0.200    1.00
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
detach(senscurva2)

## Curva 3
attach(senscurva3)
# Generando la matriz de perfil sensorial para el tiempo a evaluar - extrayendo columnas con la información de sabor
sens = senscurva3[,6:ncol(senscurva3)]
# Convirtiendo las columnas extraidas en una matriz
m_sens=as.matrix(sens)
## Análisis de sabor indicador
invgen <- multipatt(m_sens, gen, func = "r.g", control = how(nperm=9999), duleg = T)
summary(invgen, alpha = 1)
## 
##  Multilevel pattern analysis
##  ---------------------------
## 
##  Association function: r.g
##  Significance level (alpha): 1
## 
##  Total number of species: 13
##  Selected number of species: 13 
##  Number of species associated to 1 group: 13 
##  Number of species associated to 2 groups: 0 
## 
##  List of species associated to each combination: 
## 
##  Group ICS 95  #sps.  1 
##          stat p.value
## violeta 0.147       1
## 
##  Group TCS 01  #sps.  12 
##               stat p.value   
## frutal       0.803  0.0028 **
## floral       0.732  0.0094 **
## frutos.secos 0.613  0.0355 * 
## astringente  0.588  0.0633 . 
## amargo       0.525  0.1112   
## herbal       0.472  0.2481   
## verde        0.472  0.2537   
## dulce        0.471  0.2008   
## cacao        0.408  0.2965   
## rancio       0.316  0.7378   
## humedad      0.232  0.6825   
## acido        0.154  0.9696   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
invdia <- multipatt(m_sens, dia, func = "r.g", control = how(nperm=9999), duleg = T)
summary(invdia, alpha = 1)
## 
##  Multilevel pattern analysis
##  ---------------------------
## 
##  Association function: r.g
##  Significance level (alpha): 1
## 
##  Total number of species: 13
##  Selected number of species: 13 
##  Number of species associated to 1 group: 13 
## 
##  List of species associated to each combination: 
## 
##  Group 5  #sps.  7 
##               stat p.value
## dulce        0.333   0.366
## herbal       0.267   0.577
## frutal       0.162   0.742
## rancio       0.149   1.000
## floral       0.094   1.000
## frutos.secos 0.079   1.000
## amargo       0.000   1.000
## 
##  Group 6  #sps.  6 
##              stat p.value
## verde       0.267   0.573
## acido       0.218   0.629
## violeta     0.209   0.731
## cacao       0.192   0.687
## astringente 0.092   1.000
## humedad     0.055   0.932
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
invgendia <- multipatt(m_sens, gendia, func = "r.g", control = how(nperm=9999), duleg = T)
summary(invgendia, alpha = 1)
## 
##  Multilevel pattern analysis
##  ---------------------------
## 
##  Association function: r.g
##  Significance level (alpha): 1
## 
##  Total number of species: 13
##  Selected number of species: 13 
##  Number of species associated to 1 group: 13 
##  Number of species associated to 2 groups: 0 
##  Number of species associated to 3 groups: 0 
##  Number of species associated to 4 groups: 0 
##  Number of species associated to 5 groups: 0 
## 
##  List of species associated to each combination: 
## 
##  Group ICS 95_6  #sps.  1 
##          stat p.value
## violeta 0.373       1
## 
##  Group TCS 01_5  #sps.  9 
##               stat p.value   
## herbal       0.837  0.0285 * 
## frutos.secos 0.811  0.0084 **
## dulce        0.745  0.0326 * 
## frutal       0.725  0.0479 * 
## floral       0.715  0.0754 . 
## astringente  0.620  0.1570   
## amargo       0.332  0.8870   
## cacao        0.258  0.9858   
## rancio       0.200  1.0000   
## 
##  Group TCS 01_6  #sps.  3 
##          stat p.value
## verde   0.478   0.606
## humedad 0.368   0.616
## acido   0.293   1.000
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
detach(senscurva3)