| ecomor {ade4} | R Documentation |
This data set gives ecomorphological informations about 129 bird species.
data(ecomor)
ecomor is a list of 7 components.
'taxo': the variables are factors giving nested classifications.Blondel, J., Vuilleumier, F., Marcus, L.F., and Terouanne, E. (1984). Is there ecomorphological convergence among mediterranean bird communities of Chile, California, and France. In Evolutionary Biology (eds M.K. Hecht, B. Wallace and R.J. MacIntyre), 141–213, 18. Plenum Press, New York.
See a data description at http://pbil.univ-lyon1.fr/R/pps/pps023.pdf (in French).
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)
## Not run:
dmorpho <- dist.quant(log(ecomor$morpho), 3)
dhabitat <- dist.binary(ecomor$habitat, 1)
dtaxo <- dist.taxo(ecomor$taxo)
mantel.randtest(dmorpho, dhabitat)
RV.rtest(pcoscaled(dmorpho), pcoscaled(dhabitat), 999)
procuste.randtest(pcoscaled(dmorpho), pcoscaled(dhabitat))
ecophy <- taxo2phylog(ecomor$taxo, add.tools=TRUE)
table.phylog(ecomor$habitat, ecophy, clabel.n = 0.5, f = 0.6,
clabel.c = 0.75, clabel.r = 0.5, csi = 0.75, cleg = 0)
plot.phylog(ecophy, clabel.n = 0.75, clabel.l = 0.75,
labels.l = ecomor$labels[,"latin"])
mantel.randtest(dmorpho, dtaxo)
mantel.randtest(dhabitat, dtaxo)
## End(Not run)
> library(ade4) > ### Name: ecomor > ### Title: Ecomorphological Convergence > ### Aliases: ecomor > ### Keywords: datasets > > ### ** Examples > > 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)
> dtaxo <- dist.taxo(ecomor$taxo)
>
> mantel.randtest(dmorpho, dhabitat)
Monte-Carlo test
Call: mantel.randtest(m1 = dmorpho, m2 = dhabitat)
Observation: 0.06043084
Based on 999 replicates
Simulated p-value: 0.001
Alternative hypothesis: greater
Std.Obs Expectation Variance
3.2300379963 0.0000333508 0.0003496412
> RV.rtest(pcoscaled(dmorpho), pcoscaled(dhabitat), 999)
Monte-Carlo test
Observation: 0.1269869
Call: RV.rtest(df1 = pcoscaled(dmorpho), df2 = pcoscaled(dhabitat),
nrepet = 999)
Based on 999 replicates
Simulated p-value: 0.001
> procuste.randtest(pcoscaled(dmorpho), pcoscaled(dhabitat))
Monte-Carlo test
Call: procuste.randtest(df1 = pcoscaled(dmorpho), df2 = pcoscaled(dhabitat))
Observation: 0.2959761
Based on 999 replicates
Simulated p-value: 0.001
Alternative hypothesis: greater
Std.Obs Expectation Variance
4.6397769185 0.2301967320 0.0002009951
>
> ecophy <- taxo2phylog(ecomor$taxo, add.tools=TRUE)
> table.phylog(ecomor$habitat, ecophy, clabel.n = 0.5, f = 0.6,
+ clabel.c = 0.75, clabel.r = 0.5, csi = 0.75, cleg = 0)

> plot.phylog(ecophy, clabel.n = 0.75, clabel.l = 0.75, + labels.l = ecomor$labels[,"latin"])

> mantel.randtest(dmorpho, dtaxo)
Monte-Carlo test
Call: mantel.randtest(m1 = dmorpho, m2 = dtaxo)
Observation: 0.4350921
Based on 999 replicates
Simulated p-value: 0.001
Alternative hypothesis: greater
Std.Obs Expectation Variance
8.1344355854 -0.0007739536 0.0028711194
> mantel.randtest(dhabitat, dtaxo)
Monte-Carlo test
Call: mantel.randtest(m1 = dhabitat, m2 = dtaxo)
Observation: 0.03270164
Based on 999 replicates
Simulated p-value: 0.028
Alternative hypothesis: greater
Std.Obs Expectation Variance
2.0002711863 -0.0000635870 0.0002683172
>
>
>
>