data(ecomor)
ric <- apply(ecomor$habitat, 2, sum)
s.corcircle(dudi.pca(log(ecomor$morpho), scan = FALSE)$co)
forsub <- data.frame(t(apply(ecomor$forsub, 1, function (x) x/sum(x))))
pca1 <- dudi.pca(forsub, scan = FALSE, scale = FALSE)
s.arrow(pca1$c1)
w <- as.matrix(forsub)s.label(w, clab = 0, add.p = TRUE, cpoi = 2)
diet <- data.frame(t(apply(ecomor$diet, 1, function (x) x/sum(x))))
pca2 <- dudi.pca(diet, scan = FALSE, scale = FALSE)
s.arrow(pca2$c1)
w <- as.matrix(diet)s.label(w, clab = 0, add.p = TRUE, cpoi = 2)
dmorpho <- dist.quant(log(ecomor$morpho), 3)
dhabitat <- dist.binary(ecomor$habitat, 1)
mantel.randtest(dmorpho, dhabitat)
RV.rtest(pcoscaled(dmorpho), pcoscaled(dhabitat), 999)
procuste.randtest(pcoscaled(dmorpho), pcoscaled(dhabitat))
Run the code above in your browser using DataLab