## load included data
data(abis)
## obtain several similarity matrices and correlate them
## with one other matrix.
# calculate soerensen similarity for species composition data
abis.soer <- sim(abis.spec, listout = TRUE)[,3]
# calculate euclidean distances between the plot locations
abis.geodist <- dist(abis.env[,1:2])
# calculate the ecological distance according to slope and aspect
abis.aslopect <- with(abis.env, aslopect(aspect, slope))
# calculate the ecological distance according to disturbance
abis.pert <- dist(abis.env[,19-25])
# put distances according to environment together
abis.envdist <- data.frame(dist = c(abis.geodist),
aslopect = c(abis.aslopect), pert = c(abis.pert))
# no mantel correlation between those constructed
# variables and the similarity in species composition
dfcor(abis.soer, abis.envdist)
Run the code above in your browser using DataLab