data(metMUD2)
# Original factor encoding:
levels(metMUD2$groups)
# Split those original levels into 2 new ones (re-code them)
new.grps <- list(geneBb = c("B", "b"), geneCc = c("C", "c"))
mM3 <- splitSpectraGroups(metMUD2, new.grps)
# Now do the PCA and anova, with 3 ways to see the results
pca <- c_pcaSpectra(mM3)
res <- hypTestScores(mM3, pca, fac = c("geneBb", "geneCc"))
res
summary(res)
summary.aov(res)
# You can also call this function on the existing groups:
res <- hypTestScores(metMUD2, pca, fac = "groups")
Run the code above in your browser using DataLab