data(lascaux)
if(adegraphicsLoaded()) {
g1 <- s1d.barchart(dudi.pca(lascaux$meris, scan = FALSE)$eig, psub.text = "Meristic",
p1d.horizontal = FALSE, plot = FALSE)
g2 <- s1d.barchart(dudi.pca(lascaux$colo, scan = FALSE)$eig, psub.text = "Coloration",
p1d.horizontal = FALSE, plot = FALSE)
g3 <- s1d.barchart(dudi.pca(na.omit(lascaux$morpho), scan = FALSE)$eig,
psub.text = "Morphometric", p1d.horizontal = FALSE, plot = FALSE)
g4 <- s1d.barchart(dudi.acm(na.omit(lascaux$orne), scan = FALSE)$eig,
psub.text = "Ornemental", p1d.horizontal = FALSE, plot = FALSE)
G <- ADEgS(c(g1, g2, g3, g4), layout = c(2, 2))
} else {
par(mfrow = c(2,2))
barplot(dudi.pca(lascaux$meris, scan = FALSE)$eig)
title(main = "Meristic")
barplot(dudi.pca(lascaux$colo, scan = FALSE)$eig)
title(main = "Coloration")
barplot(dudi.pca(na.omit(lascaux$morpho), scan = FALSE)$eig)
title(main = "Morphometric")
barplot(dudi.acm(na.omit(lascaux$orne), scan = FALSE)$eig)
title(main = "Ornemental")
par(mfrow = c(1,1))
}
Run the code above in your browser using DataLab