## Data dfr <- params$dfr colnames(dfr)[2:4] <- c("Appe", "Tast", "Text") ## Count number of men and women temp <- dfr[dfr$Sex == "M" | dfr$Sex == "Male", ] nm <- length(unique(temp$PanelNo)) temp <- dfr[dfr$Sex == "F" | dfr$Sex == "Female", ] nw <- length(unique(temp$PanelNo)) ## Aggregate data for principal components adg <- docomp("sum", c("Appe", "Tast", "Text"), "INSTN", dfr = dfr) temp <- docomp("sum", c("Appe", "Tast", "Text"), c("INSTN", "Sex"), dfr = dfr) adm <- temp[temp$Sex == "M" | temp$Sex == "Male", ] adf <- temp[temp$Sex == "F" | temp$Sex == "Female", ] colnames(adm)[3:5] <- c("Appe-M", "Tast-M", "Text-M") colnames(adf)[3:5] <- c("Appe-F", "Tast-F", "Text-F") ads <- cbind(adm[, c(1, 3:5)], adf[, 3:5]) rownames(ads) <- ads$INSTN rownames(adg) <- adg$INSTN ads <- ads[, -1] adg <- adg[, -1]
Samples of all genotypes are boiled and presented on plates. Each genotype is evaluated about appearance and taste with the options:
and about texture with:
For the graphs below, the following abbreviations are used:
Appe
: Appearance.Tast
: Taste.Text
: Texture.Appe-M
: Men opinion on appearance.Tast-M
: Men opinion on taste.Text-M
: Men opinion on texture.Appe-W
: Women opinion on appearance.Tast-W
: Women opinion on taste.Text-W
: Women opinion on texture.A principal components analysis is shown to see the associations among the genotypes and the attributes, first with all the panelists together and then with panelists opinions differentiated by gender.
princip <- prcomp(adg, center = TRUE, scale. = TRUE) summary(princip) factoextra::fviz_pca(princip, repel = TRUE, title = "Biplot of genotypes and attributes")
princip <- prcomp(ads, center = TRUE, scale. = TRUE) summary(princip) factoextra::fviz_pca(princip, repel = TRUE, title = "Biplot of genotypes and attributes by gender")
ft <- with(dfr, friedman(PanelNo, INSTN, Appe, group = TRUE)) ft$statistics ft$groups ft <- with(dfr, friedman(PanelNo, INSTN, Appe, group = FALSE)) ft$comparison
ft <- with(dfr, friedman(PanelNo, INSTN, Tast, group = TRUE)) ft$statistics ft$groups ft <- with(dfr, friedman(PanelNo, INSTN, Tast, group = FALSE)) ft$comparison
ft <- with(dfr, friedman(PanelNo, INSTN, Text, group = TRUE)) ft$statistics ft$groups ft <- with(dfr, friedman(PanelNo, INSTN, Text, group = FALSE)) ft$comparison
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.