Schefferville - transitions; Supplementary 3 and 7 cluster analyzes

Tammy L. Elliott

Date: May 8, 2015

R version 3.1.0

# set global chunk options: 
library(knitr)
opts_chunk$set(cache=FALSE, fig.align='center')

Placement of five clusters

#Plot this relationship
#dev.new(width=11.8, height=11.8)
par(mfrow=c(3,3))
par(mar=c(5.1,4.1,4.1,2.1))
site.dist.5<-cmdscale(site.env.dist, k = 54, eig = FALSE, add = FALSE, x.ret = FALSE)
plot(site.dist.5, type="n", xlab="", ylab="", main="", cex=1, pch=16, col="black", xaxt='n', yaxt="n")
ordispider(site.dist.5, site.dist.cfuz$cluster, col="grey40", label=TRUE)
ordiellipse(site.dist.5, site.dist.cfuz$cluster, col="grey70")
box(lwd=1)

#Now do a K-means clustering analysis of these distances
ccas.env<-cascadeKM((site.env.dist),2,15)
plot(ccas.env,sortq=TRUE)

par(mar=c(1,1,1,2))
site.dist.5.3d<-with(site.coord, scatter3D(x = site.lon[,1], y = site.lat[,1], z = site.elev[,1], colvar = site.dist.cfuz$clustering,
col=c("grey95", "gray75", "gray60", "gray25", "black"),pch = 16, cex = 1.25,  cex.lab=1.35, cex.axis=1,xlab = "Longitude", ylab = "Latitude",
zlab = "Elevation (m)", 
main = "", ticktype = "simple", theta = 35, d = 5,
colkey = list(length = 0.45, width = 0.5, cex.clab = 0.65))
)

par(mar=c(5.1,4.1,4.1,2.1))
angio.abd1.dist.5<-cmdscale(angio.abd1.dist, k = 54, eig = FALSE, add = FALSE, x.ret = FALSE)
plot(angio.abd1.dist.5, type="n", xlab="", ylab="", main="", cex=1, pch=16, col="black", xaxt='n', yaxt="n")
ordispider(angio.abd1.dist.5, angio.abd1.cfuz$cluster, col="grey40", label=TRUE)
ordiellipse(angio.abd1.dist.5, angio.abd1.cfuz$cluster, col="grey70")
box(lwd=1)

#Now do a K-means clustering analysis of these distances
ccas.env<-cascadeKM((angio.abd1.dist),2,15)
plot(ccas.env,sortq=TRUE)

par(mar=c(1,1,1,2))
angio.abd1.dist.5.3d<-with(site.coord, scatter3D(x = site.lon[,1], y = site.lat[,1], z = site.elev[,1], colvar = angio.abd1.cfuz$clustering,
col=c("grey95", "gray75", "gray60", "gray25", "black"),pch = 16, cex = 1.25,  cex.lab=1.35, cex.axis=1,xlab = "Longitude", ylab = "Latitude",
zlab = "Elevation (m)", 
main = "", ticktype = "simple", theta = 35, d = 5,
colkey = FALSE)
)

par(mar=c(5.1,4.1,4.1,2.1))
angio.ph.abd1.dist.5<-cmdscale(angio.ph.abd1.dist, k = 54, eig = FALSE, add = FALSE, x.ret = FALSE)
plot(angio.ph.abd1.dist.5, type="n", xlab="", ylab="", main="", cex=1, pch=16, col="black", xaxt='n', yaxt="n")
ordispider(angio.ph.abd1.dist.5, angio.ph.abd1.cfuz$cluster, col="grey40", label=TRUE)
ordiellipse(angio.ph.abd1.dist.5, angio.ph.abd1.cfuz$cluster, col="grey70")
box(lwd=1)

#Now do a K-means clustering analysis of these distances
ccas.env<-cascadeKM((angio.ph.abd1.dist),2,15)
plot(ccas.env,sortq=TRUE)

par(mar=c(1,1,1,2))
angio.ph.abd1.dist.5.3d<-with(site.coord, scatter3D(x = site.lon[,1], y = site.lat[,1], z = site.elev[,1], colvar = angio.ph.abd1.cfuz$clustering,
col=c("grey95", "gray75", "gray60", "gray25", "black"),pch = 16, cex = 1.25,  cex.lab=1.35, cex.axis=1,xlab = "Longitude", ylab = "Latitude",
zlab = "Elevation (m)", 
main = "", ticktype = "simple", theta = 35, d = 5,
colkey = FALSE)
)

#textClick.bold("(A)", cex=1.75)
#textClick.bold("(B)", cex=1.75)
#textClick.bold("(C)", cex=1.75)
#textClick.bold("(D)", cex=1.75)
#textClick.bold("(E)", cex=1.75)
#textClick.bold("(F)", cex=1.75)
#textClick.bold("(G)", cex=1.75)
#textClick.bold("(H)", cex=1.75)
#textClick.bold("(I)", cex=1.75)

Placement of Three clusters for Vasculars

#Plot this relationship
#dev.new(width=11.8, height=11.8)
par(mfrow=c(3,3))
par(mar=c(5.1,4.1,4.1,2.1))
site.dist.3<-cmdscale(site.env.dist, k = 54, eig = FALSE, add = FALSE, x.ret = FALSE)
plot(site.dist.3, type="n", xlab="", ylab="", main="", cex=1, pch=16, col="black", xaxt='n', yaxt="n")
ordispider(site.dist.3, site.dist.cfuz.3$cluster, col="grey40", label=TRUE)
ordiellipse(site.dist.3, site.dist.cfuz.3$cluster, col="grey70")
box(lwd=1)

#Now do a K-means clustering analysis of these distances
ccas.env<-cascadeKM((site.env.dist),2,15)
plot(ccas.env,sortq=TRUE)

par(mar=c(1,1,1,2))
site.dist.3.3d<-with(site.coord, scatter3D(x = site.lon[,1], y = site.lat[,1], z = site.elev[,1], colvar = site.dist.cfuz.3$clustering,
col=c("grey95", "gray75", "gray60", "gray25", "black"),pch = 16, cex = 1.25,  cex.lab=1.35, cex.axis=1,xlab = "Longitude", ylab = "Latitude",
zlab = "Elevation (m)", 
main = "", ticktype = "simple", theta = 35, d = 5,
colkey = list(length = 0.45, width = 0.3, cex.clab = 0.65))
)

par(mar=c(5.1,4.1,4.1,2.1))
vasc.abd1.dist.3<-cmdscale(vasc.abd1.dist, k = 54, eig = FALSE, add = FALSE, x.ret = FALSE)
plot(vasc.abd1.dist.3, type="n", xlab="", ylab="", main="", cex=1, pch=16, col="black", xaxt='n', yaxt="n")
ordispider(vasc.abd1.dist.3, vasc.abd1.cfuz.3$cluster, col="grey40", label=TRUE)
ordiellipse(vasc.abd1.dist.3, vasc.abd1.cfuz.3$cluster, col="grey70")
box(lwd=1)

#Now do a K-means clustering analysis of these distances
ccas.env<-cascadeKM((vasc.abd1.dist),2,15)
plot(ccas.env,sortq=TRUE)

par(mar=c(1,1,1,2))
vasc.abd1.dist.3.3d<-with(site.coord, scatter3D(x = site.lon[,1], y = site.lat[,1], z = site.elev[,1], colvar = vasc.abd1.cfuz.3$clustering,
col=c("grey95", "gray75", "gray60", "gray25", "black"),pch = 16, cex = 1.25,  cex.lab=1.35, cex.axis=1,xlab = "Longitude", ylab = "Latitude",
zlab = "Elevation (m)", 
main = "", ticktype = "simple", theta = 35, d = 5,
colkey = FALSE)
)

par(mar=c(5.1,4.1,4.1,2.1))
vasc.ph.abd1.dist.3<-cmdscale(vasc.ph.abd1.dist, k = 54, eig = FALSE, add = FALSE, x.ret = FALSE)
plot(vasc.ph.abd1.dist.3, type="n", xlab="", ylab="", main="", cex=1, pch=16, col="black", xaxt='n', yaxt="n")
ordispider(vasc.ph.abd1.dist.3, vasc.ph.abd1.cfuz.3$cluster, col="grey40", label=TRUE)
ordiellipse(vasc.ph.abd1.dist.3, vasc.ph.abd1.cfuz.3$cluster, col="grey70")
box(lwd=1)

#Now do a K-means clustering analysis of these distances
ccas.env<-cascadeKM((vasc.ph.abd1.dist),2,15)
plot(ccas.env,sortq=TRUE)

par(mar=c(1,1,1,2))
vasc.ph.abd1.dist.3.3d<-with(site.coord, scatter3D(x = site.lon[,1], y = site.lat[,1], z = site.elev[,1], colvar = vasc.ph.abd1.cfuz.3$clustering,
col=c("grey95", "gray75", "gray60", "gray25", "black"),pch = 16, cex = 1.25,  cex.lab=1.35, cex.axis=1,xlab = "Longitude", ylab = "Latitude",
zlab = "Elevation (m)", 
main = "", ticktype = "simple", theta = 35, d = 5,
colkey = FALSE)
)

#textClick.bold("(A)", cex=1.75)
#textClick.bold("(B)", cex=1.75)
#textClick.bold("(C)", cex=1.75)
#textClick.bold("(D)", cex=1.75)
#textClick.bold("(E)", cex=1.75)
#textClick.bold("(F)", cex=1.75)
#textClick.bold("(G)", cex=1.75)
#textClick.bold("(H)", cex=1.75)
#textClick.bold("(I)", cex=1.75)

Placement of Three clusters for Angiosperms

#Plot this relationship
#dev.new(width=11.8, height=11.8)
par(mfrow=c(3,3))
par(mar=c(5.1,4.1,4.1,2.1))
site.dist.3<-cmdscale(site.env.dist, k = 54, eig = FALSE, add = FALSE, x.ret = FALSE)
plot(site.dist.3, type="n", xlab="", ylab="", main="", cex=1, pch=16, col="black", xaxt='n', yaxt="n")
ordispider(site.dist.3, site.dist.cfuz.3$cluster, col="grey40", label=TRUE)
ordiellipse(site.dist.3, site.dist.cfuz.3$cluster, col="grey70")
box(lwd=1)

#Now do a K-means clustering analysis of these distances
ccas.env<-cascadeKM((site.env.dist),2,15)
plot(ccas.env,sortq=TRUE)

par(mar=c(1,1,1,2))
site.dist.3.3d<-with(site.coord, scatter3D(x = site.lon[,1], y = site.lat[,1], z = site.elev[,1], colvar = site.dist.cfuz.3$clustering,
col=c("grey95", "gray75", "gray60", "gray25", "black"),pch = 16, cex = 1.25,  cex.lab=1.35, cex.axis=1,xlab = "Longitude", ylab = "Latitude",
zlab = "Elevation (m)", 
main = "", ticktype = "simple", theta = 35, d = 5,
colkey = list(length = 0.45, width = 0.3, cex.clab = 0.65))
)

par(mar=c(5.1,4.1,4.1,2.1))
angio.abd1.dist.3<-cmdscale(angio.abd1.dist, k = 54, eig = FALSE, add = FALSE, x.ret = FALSE)
plot(angio.abd1.dist.3, type="n", xlab="", ylab="", main="", cex=1, pch=16, col="black", xaxt='n', yaxt="n")
ordispider(angio.abd1.dist.3, angio.abd1.cfuz.3$cluster, col="grey40", label=TRUE)
ordiellipse(angio.abd1.dist.3, angio.abd1.cfuz.3$cluster, col="grey70")
box(lwd=1)

#Now do a K-means clustering analysis of these distances
ccas.env<-cascadeKM((angio.abd1.dist),2,15)
plot(ccas.env,sortq=TRUE)

par(mar=c(1,1,1,2))
angio.abd1.dist.3.3d<-with(site.coord, scatter3D(x = site.lon[,1], y = site.lat[,1], z = site.elev[,1], colvar = angio.abd1.cfuz.3$clustering,
col=c("grey95", "gray75", "gray60", "gray25", "black"),pch = 16, cex = 1.25,  cex.lab=1.35, cex.axis=1,xlab = "Longitude", ylab = "Latitude",
zlab = "Elevation (m)", 
main = "", ticktype = "simple", theta = 35, d = 5,
colkey = FALSE)
)

par(mar=c(5.1,4.1,4.1,2.1))
angio.ph.abd1.dist.3<-cmdscale(angio.ph.abd1.dist, k = 54, eig = FALSE, add = FALSE, x.ret = FALSE)
plot(angio.ph.abd1.dist.3, type="n", xlab="", ylab="", main="", cex=1, pch=16, col="black", xaxt='n', yaxt="n")
ordispider(angio.ph.abd1.dist.3, angio.ph.abd1.cfuz.3$cluster, col="grey40", label=TRUE)
ordiellipse(angio.ph.abd1.dist.3, angio.ph.abd1.cfuz.3$cluster, col="grey70")
box(lwd=1)

#Now do a K-means clustering analysis of these distances
ccas.env<-cascadeKM((angio.ph.abd1.dist),2,15)
plot(ccas.env,sortq=TRUE)

par(mar=c(1,1,1,2))
angio.ph.abd1.dist.3.3d<-with(site.coord, scatter3D(x = site.lon[,1], y = site.lat[,1], z = site.elev[,1], colvar = angio.ph.abd1.cfuz.3$clustering,
col=c("grey95", "gray75", "gray60", "gray25", "black"),pch = 16, cex = 1.25,  cex.lab=1.35, cex.axis=1,xlab = "Longitude", ylab = "Latitude",
zlab = "Elevation (m)", 
main = "", ticktype = "simple", theta = 35, d = 5,
colkey = FALSE)
)

#textClick.bold("(A)", cex=1.75)
#textClick.bold("(B)", cex=1.75)
#textClick.bold("(C)", cex=1.75)
#textClick.bold("(D)", cex=1.75)
#textClick.bold("(E)", cex=1.75)
#textClick.bold("(F)", cex=1.75)
#textClick.bold("(G)", cex=1.75)
#textClick.bold("(H)", cex=1.75)
#textClick.bold("(I)", cex=1.75)

Placement of Seven clusters for Vasculars

#Plot this relationship
#dev.new(width=11.8, height=11.8)
par(mfrow=c(3,3))
par(mar=c(5.1,4.1,4.1,2.1))
site.dist.7<-cmdscale(site.env.dist, k = 54, eig = FALSE, add = FALSE, x.ret = FALSE)
plot(site.dist.7, type="n", xlab="", ylab="", main="", cex=1, pch=16, col="black", xaxt='n', yaxt="n")
ordispider(site.dist.7, site.dist.cfuz.7$cluster, col="grey40", label=TRUE)
ordiellipse(site.dist.7, site.dist.cfuz.7$cluster, col="grey70")
box(lwd=1)

#Now do a K-means clustering analysis of these distances
ccas.env<-cascadeKM((site.env.dist),2,15)
plot(ccas.env,sortq=TRUE)

par(mar=c(1,1,1,2))
site.dist.7.3d<-with(site.coord, scatter3D(x = site.lon[,1], y = site.lat[,1], z = site.elev[,1], colvar = site.dist.cfuz.7$clustering,
col=c("grey95", "grey85","gray75", "gray60", "grey45","gray25", "black"),pch = 16, cex = 1.25,  cex.lab=1.35, cex.axis=1,xlab = "Longitude", ylab = "Latitude",
zlab = "Elevation (m)", 
main = "", ticktype = "simple", theta = 35, d = 5,
colkey = list(length = 0.45, width = 0.7, cex.clab = 0.65))
)

par(mar=c(5.1,4.1,4.1,2.1))
vasc.abd1.dist.7<-cmdscale(vasc.abd1.dist, k = 54, eig = FALSE, add = FALSE, x.ret = FALSE)
plot(vasc.abd1.dist.7, type="n", xlab="", ylab="", main="", cex=1, pch=16, col="black", xaxt='n', yaxt="n")
ordispider(vasc.abd1.dist.7, vasc.abd1.cfuz.7$cluster, col="grey40", label=TRUE)
ordiellipse(vasc.abd1.dist.7, vasc.abd1.cfuz.7$cluster, col="grey70")
box(lwd=1)

#Now do a K-means clustering analysis of these distances
ccas.env<-cascadeKM((vasc.abd1.dist),2,15)
plot(ccas.env,sortq=TRUE)

par(mar=c(1,1,1,2))
vasc.abd1.dist.7.3d<-with(site.coord, scatter3D(x = site.lon[,1], y = site.lat[,1], z = site.elev[,1], colvar = vasc.abd1.cfuz.7$clustering,
col=c("grey95", "grey85","gray75", "gray60", "grey45","gray25", "black"),pch = 16, cex = 1.25,  cex.lab=1.35, cex.axis=1,xlab = "Longitude", ylab = "Latitude",
zlab = "Elevation (m)", 
main = "", ticktype = "simple", theta = 35, d = 5,
colkey = FALSE)
)

par(mar=c(5.1,4.1,4.1,2.1))
vasc.ph.abd1.dist.7<-cmdscale(vasc.ph.abd1.dist, k = 54, eig = FALSE, add = FALSE, x.ret = FALSE)
plot(vasc.ph.abd1.dist.7, type="n", xlab="", ylab="", main="", cex=1, pch=16, col="black", xaxt='n', yaxt="n")
ordispider(vasc.ph.abd1.dist.7, vasc.ph.abd1.cfuz.7$cluster, col="grey40", label=TRUE)
ordiellipse(vasc.ph.abd1.dist.7, vasc.ph.abd1.cfuz.7$cluster, col="grey70")
box(lwd=1)

#Now do a K-means clustering analysis of these distances
ccas.env<-cascadeKM((vasc.ph.abd1.dist),2,15)
plot(ccas.env,sortq=TRUE)

par(mar=c(1,1,1,2))
vasc.ph.abd1.dist.7.7d<-with(site.coord, scatter3D(x = site.lon[,1], y = site.lat[,1], z = site.elev[,1], colvar = vasc.ph.abd1.cfuz.7$clustering,
col=c("grey95", "grey85","gray75", "gray60", "grey45","gray25", "black"),pch = 16, cex = 1.25,  cex.lab=1.35, cex.axis=1,xlab = "Longitude", ylab = "Latitude",
zlab = "Elevation (m)", 
main = "", ticktype = "simple", theta = 35, d = 5,
colkey = FALSE)
)

#textClick.bold("A)", cex=1.5)
#textClick.bold("B)", cex=1.5)
#textClick.bold("C)", cex=1.5)
#textClick.bold("D)", cex=1.5)
#textClick.bold("E)", cex=1.5)
#textClick.bold("F)", cex=1.5)
#textClick.bold("G)", cex=1.5)
#textClick.bold("H)", cex=1.5)
#textClick.bold("I)", cex=1.5)

Placement of Seven clusters for Angiosperms

#Plot this relationship
#dev.new(width=11.8, height=11.8)
par(mfrow=c(3,3))
par(mar=c(5.1,4.1,4.1,2.1))
site.dist.7<-cmdscale(site.env.dist, k = 54, eig = FALSE, add = FALSE, x.ret = FALSE)
plot(site.dist.7, type="n", xlab="", ylab="", main="", cex=1, pch=16, col="black", xaxt='n', yaxt="n")
ordispider(site.dist.7, site.dist.cfuz.7$cluster, col="grey40", label=TRUE)
ordiellipse(site.dist.7, site.dist.cfuz.7$cluster, col="grey70")
box(lwd=1)

#Now do a K-means clustering analysis of these distances
ccas.env<-cascadeKM((site.env.dist),2,15)
plot(ccas.env,sortq=TRUE)

par(mar=c(1,1,1,2))
site.dist.7.3d<-with(site.coord, scatter3D(x = site.lon[,1], y = site.lat[,1], z = site.elev[,1], colvar = site.dist.cfuz.7$clustering,
col=c("grey95", "grey85","gray75", "gray60", "grey45","gray25", "black"),pch = 16, cex = 1.25,  cex.lab=1.35, cex.axis=1,xlab = "Longitude", ylab = "Latitude",
zlab = "Elevation (m)", 
main = "", ticktype = "simple", theta = 35, d = 5,
colkey = list(length = 0.45, width = 0.7, cex.clab = 0.65))
)

par(mar=c(5.1,4.1,4.1,2.1))
angio.abd1.dist.7<-cmdscale(angio.abd1.dist, k = 54, eig = FALSE, add = FALSE, x.ret = FALSE)
plot(angio.abd1.dist.7, type="n", xlab="", ylab="", main="", cex=1, pch=16, col="black", xaxt='n', yaxt="n")
ordispider(angio.abd1.dist.7, angio.abd1.cfuz.7$cluster, col="grey40", label=TRUE)
ordiellipse(angio.abd1.dist.7, angio.abd1.cfuz.7$cluster, col="grey70")
box(lwd=1)

#Now do a K-means clustering analysis of these distances
ccas.env<-cascadeKM((angio.abd1.dist),2,15)
plot(ccas.env,sortq=TRUE)

par(mar=c(1,1,1,2))
angio.abd1.dist.7.3d<-with(site.coord, scatter3D(x = site.lon[,1], y = site.lat[,1], z = site.elev[,1], colvar = angio.abd1.cfuz.7$clustering,
col=c("grey95", "grey85","gray75", "gray60", "grey45","gray25", "black"),pch = 16, cex = 1.25,  cex.lab=1.35, cex.axis=1,xlab = "Longitude", ylab = "Latitude",
zlab = "Elevation (m)", 
main = "", ticktype = "simple", theta = 35, d = 5,
colkey = FALSE)
)

par(mar=c(5.1,4.1,4.1,2.1))
angio.ph.abd1.dist.7<-cmdscale(angio.ph.abd1.dist, k = 54, eig = FALSE, add = FALSE, x.ret = FALSE)
plot(angio.ph.abd1.dist.7, type="n", xlab="", ylab="", main="", cex=1, pch=16, col="black", xaxt='n', yaxt="n")
ordispider(angio.ph.abd1.dist.7, angio.ph.abd1.cfuz.7$cluster, col="grey40", label=TRUE)
ordiellipse(angio.ph.abd1.dist.7, angio.ph.abd1.cfuz.7$cluster, col="grey70")
box(lwd=1)

#Now do a K-means clustering analysis of these distances
ccas.env<-cascadeKM((angio.ph.abd1.dist),2,15)
plot(ccas.env,sortq=TRUE)

par(mar=c(1,1,1,2))
angio.ph.abd1.dist.7.7d<-with(site.coord, scatter3D(x = site.lon[,1], y = site.lat[,1], z = site.elev[,1], colvar = angio.ph.abd1.cfuz.7$clustering,
col=c("grey95", "grey85","gray75", "gray60", "grey45","gray25", "black"),pch = 16, cex = 1.25,  cex.lab=1.35, cex.axis=1,xlab = "Longitude", ylab = "Latitude",
zlab = "Elevation (m)", 
main = "", ticktype = "simple", theta = 35, d = 5,
colkey = FALSE)
)

#textClick.bold("(A)", cex=1.75)
#textClick.bold("(B)", cex=1.75)
#textClick.bold("(C)", cex=1.75)
#textClick.bold("(D)", cex=1.75)
#textClick.bold("(E)", cex=1.75)
#textClick.bold("(F)", cex=1.75)
#textClick.bold("(G)", cex=1.75)
#textClick.bold("(H)", cex=1.75)
#textClick.bold("(I)", cex=1.75)

Partition comparisons

Three cluster adjusted Rand

compPart.3.crand<-rbind(site.dist.compPart.3.crand,vasc.abd1.compPart.3.crand, vasc.ph.abd1.compPart.3.crand,
    angio.abd1.compPart.3.crand,angio.ph.abd1.compPart.3.crand )
rownames(compPart.3.crand)<-c("Env.dist",  "Vasc.BD", "Vasc.PhBD", "Angio.BD", "Angio.PhBD") 
colnames(compPart.3.crand)<-c("Env.dist",  "Vasc.BD", "Vasc.PhBD", "Angio.BD", "Angio.PhBD") 
compPart.3.crand
##            Env.dist Vasc.BD Vasc.PhBD Angio.BD Angio.PhBD
## Env.dist       1.00    0.23      0.11     0.12       0.17
## Vasc.BD        0.23    1.00      0.34     0.40       0.26
## Vasc.PhBD      0.11    0.34      1.00     0.14       0.29
## Angio.BD       0.12    0.40      0.14     1.00       0.34
## Angio.PhBD     0.17    0.26      0.29     0.34       1.00

Seven cluster Adjusted Rand index

compPart.7.crand<-rbind(site.dist.compPart.7.crand,vasc.abd1.compPart.7.crand, vasc.ph.abd1.compPart.7.crand,
    angio.abd1.compPart.7.crand,angio.ph.abd1.compPart.7.crand )
rownames(compPart.7.crand)<-c("Env.dist",  "Vasc.BD", "Vasc.PhBD", "Angio.BD", "Angio.PhBD") 
colnames(compPart.7.crand)<-c("Env.dist",  "Vasc.BD", "Vasc.PhBD", "Angio.BD", "Angio.PhBD") 
compPart.7.crand
##            Env.dist Vasc.BD Vasc.PhBD Angio.BD Angio.PhBD
## Env.dist       1.00    0.15      0.13     0.14       0.11
## Vasc.BD        0.15    1.00      0.27     0.61       0.23
## Vasc.PhBD      0.13    0.27      1.00     0.21       0.25
## Angio.BD       0.14    0.61      0.21     1.00       0.24
## Angio.PhBD     0.11    0.23      0.25     0.24       1.00

Within and among cluster comparison for both three and seven clusters

Three cluster within and among cluster comparisons

# Differences between among and within values
# Species-level differences
vasc.sp.among.within.diff<-(sp.vasc.part.among$pCqN-abd.sp.part.within.1.3.vasc$pCqN)+
(sp.vasc.part.among$pCqN-abd.sp.part.within.2.3.vasc$pCqN)+
(sp.vasc.part.among$pCqN-abd.sp.part.within.3.3.vasc$pCqN)
vasc.sp.among.within.diff
## [1] 0.07129949
# Phylogenetic differences
vasc.ph.among.within.diff<-(vasc.part.among$pCqN-abd.ph.part.within.1.3.vasc$pCqN)+
(vasc.part.among$pCqN-abd.ph.part.within.2.3.vasc$pCqN)+
(vasc.part.among$pCqN-abd.ph.part.within.3.3.vasc$pCqN)
vasc.ph.among.within.diff
## [1] 0.04211622
angio.sp.among.within.diff<-(sp.angio.part.among$pCqN-abd.sp.part.within.1.3.angio$pCqN)+
(sp.angio.part.among$pCqN-abd.sp.part.within.2.3.angio$pCqN)+
(sp.angio.part.among$pCqN-abd.sp.part.within.3.3.angio$pCqN)
angio.sp.among.within.diff
## [1] 0.07100928
# Phylogenetic differences
angio.ph.among.within.diff<-(angio.part.among$pCqN-abd.ph.part.within.1.3.angio$pCqN)+
(angio.part.among$pCqN-abd.ph.part.within.2.3.angio$pCqN)+
(angio.part.among$pCqN-abd.ph.part.within.3.3.angio$pCqN)
angio.ph.among.within.diff
## [1] 0.02675786

Within and Among Visualization

#dev.new(width=11.8, height=8)
par(mfrow=c(2,2))
par(mai=c(0.5,1,.75,0.5))
plot(abd.sp.line.three.vasc[1,], axes=FALSE, col="black", pch=16, cex=1.25, ylab="Beta diversity", xlab="",las=1, cex.axis=1, cex.lab=1.2,
  ylim=c(0.35,1),cex.main=0.85, bty="c")
axis(1,1:3,labels=c("Group 1", "Group 2", "Group 3"))
axis(2)
points(abd.ph.line.three.vasc[1,], col="gray70", pch=16, cex=1.25)
abline(h=sp.vasc.part.among$pCqN, lwd=2, lty=2)
abline(h=vasc.part.among$pCqN, lwd=2, lty=2, col="gray70")
box(bty="l", lwd=3)
legend("bottomright", c("BD (among)", "BD (within)", "Ph.BD (among)", "Ph.BD (within)"), col = c("black","black", "gray70", "gray70"), cex=0.85,
      lty = c(2, 0,2,0),lwd=c(2,2,2,2), pch = c(NA, 16, NA, 16), bg = "white", bty="n")

par(mai=c(0.5,1,.75,0.5))
plot(abd.sp.line.three.angio[1,], axes=FALSE, col="black", pch=16, cex=1.25, ylab="Beta diversity", xlab="",las=1, cex.axis=1, cex.lab=1.2,
  ylim=c(0.35,1),cex.main=0.85, bty="c")
axis(1,1:3,labels=c("Group 1", "Group 2", "Group 3"))
axis(2)
points(abd.ph.line.three.angio[1,], col="gray70", pch=16, cex=1.25)
abline(h=sp.angio.part.among$pCqN, lwd=2, lty=2)
abline(h=angio.part.among$pCqN, lwd=2, lty=2, col="gray70")
box(bty="l", lwd=3)
legend("bottomright", c("BD (among)", "BD (within)", "Ph.BD (among)", "Ph.BD (within)"), col = c("black","black", "gray70", "gray70"), cex=0.85,
      lty = c(2, 0,2,0),lwd=c(2,2,2,2), pch = c(NA, 16, NA, 16), bg = "white", bty="n")
#textClick.bold("A)", cex=1.5)
#textClick.bold("B)", cex=1.5)

par(mai=c(0.5,1,.75,0.5))
plot(abd.sp.line.seven.vasc[1,], axes=FALSE, col="black", pch=16, cex=1.25, ylab="Beta diversity", xlab="",las=1, cex.axis=1, cex.lab=1.2,
  ylim=c(0.35,1),cex.main=0.85, bty="c")
axis(1,1:7,labels=c("Group 1", "Group 2", "Group 3", "Group 4", "Group 5", "Group 6", "Group 7"))
axis(2)
points(abd.ph.line.seven.vasc[1,], col="gray70", pch=16, cex=1.25)
abline(h=sp.vasc.part.among$pCqN, lwd=2, lty=2)
abline(h=vasc.part.among$pCqN, lwd=2, lty=2, col="gray70")
box(bty="l", lwd=3)
legend("bottomright", c("BD (among)", "BD (within)", "Ph.BD (among)", "Ph.BD (within)"), col = c("black","black", "gray70", "gray70"), cex=0.85,
      lty = c(2, 0,2,0),lwd=c(2,2,2,2), pch = c(NA, 16, NA, 16), bg = "white", bty="n")

par(mai=c(0.5,1,.75,0.5))
plot(abd.sp.line.seven.angio[1,], axes=FALSE, col="black", pch=16, cex=1.25, ylab="Beta diversity", xlab="",las=1, cex.axis=1, cex.lab=1.2,
  ylim=c(0.35,1),cex.main=0.85, bty="c")
axis(1,1:7,labels=c("Group 1", "Group 2", "Group 3", "Group 4", "Group 5", "Group 6", "Group 7"))
axis(2)
points(abd.ph.line.seven.angio[1,], col="gray70", pch=16, cex=1.25)
abline(h=sp.angio.part.among$pCqN, lwd=2, lty=2)
abline(h=angio.part.among$pCqN, lwd=2, lty=2, col="gray70")
box(bty="l", lwd=3)
legend("bottomright", c("BD (among)", "BD (within)", "Ph.BD (among)", "Ph.BD (within)"), col = c("black","black", "gray70", "gray70"), cex=0.85,
      lty = c(2, 0,2,0),lwd=c(2,2,2,2), pch = c(NA, 16, NA, 16), bg = "white", bty="n")

#textClick.bold("(a)", cex=1.5)
#textClick.bold("(b)", cex=1.5)
#textClick.bold("(c)", cex=1.5)
#textClick.bold("(d)", cex=1.5)
#textClick.bold("(A)", cex=1.7)
#textClick.bold("(B)", cex=1.7)
#textClick.bold("(C)", cex=1.7)
#textClick.bold("(D)", cex=1.7)
sp.vasc.part.among$pCqN
## [1] 0.6459545
# Differences between among and within values
# Species-level differences
seven.vasc.sp.among.within.diff<-(sp.vasc.part.among$pCqN-abd.sp.part.within.1.7.vasc$pCqN)+
(sp.vasc.part.among$pCqN-abd.sp.part.within.2.7.vasc$pCqN)+
(sp.vasc.part.among$pCqN-abd.sp.part.within.3.7.vasc$pCqN)+
(abd.sp.part.within.4.7.vasc$pCqN-sp.vasc.part.among$pCqN)+
(sp.vasc.part.among$pCqN-abd.sp.part.within.5.7.vasc$pCqN)+
(sp.vasc.part.among$pCqN-abd.sp.part.within.6.7.vasc$pCqN)+
(sp.vasc.part.among$pCqN-abd.sp.part.within.7.7.vasc$pCqN)

vasc.sp.among.within.diff
## [1] 0.07129949
# Phylogenetic differences
seven.vasc.ph.among.within.diff<-(vasc.part.among$pCqN-abd.ph.part.within.1.7.vasc$pCqN)+
(vasc.part.among$pCqN-abd.ph.part.within.2.7.vasc$pCqN)+
(vasc.part.among$pCqN-abd.ph.part.within.3.7.vasc$pCqN)+
(abd.ph.part.within.4.7.vasc$pCqN-vasc.part.among$pCqN)+
(abd.ph.part.within.5.7.vasc$pCqN-vasc.part.among$pCqN)+
(abd.ph.part.within.6.7.vasc$pCqN-vasc.part.among$pCqN)+
(abd.ph.part.within.7.7.vasc$pCqN-vasc.part.among$pCqN)
seven.vasc.ph.among.within.diff
## [1] 0.1015095
seven.angio.sp.among.within.diff<-(sp.angio.part.among$pCqN-abd.sp.part.within.1.7.angio$pCqN)+
(sp.angio.part.among$pCqN-abd.sp.part.within.2.7.angio$pCqN)+
(sp.angio.part.among$pCqN-abd.sp.part.within.3.7.angio$pCqN)+
(abd.sp.part.within.4.7.angio$pCqN-sp.angio.part.among$pCqN)+
(sp.angio.part.among$pCqN-abd.sp.part.within.5.7.angio$pCqN)+
(sp.angio.part.among$pCqN-abd.sp.part.within.6.7.angio$pCqN) +
(sp.angio.part.among$pCqN-abd.sp.part.within.7.7.angio$pCqN)  
seven.angio.sp.among.within.diff
## [1] 0.206667
# Phylogenetic differences
seven.angio.ph.among.within.diff<-(angio.part.among$pCqN-abd.ph.part.within.1.7.angio$pCqN)+
(angio.part.among$pCqN-abd.ph.part.within.2.7.angio$pCqN)+
(angio.part.among$pCqN-abd.ph.part.within.3.7.angio$pCqN)+
(angio.part.among$pCqN-abd.ph.part.within.4.7.angio$pCqN)+
(angio.part.among$pCqN-abd.ph.part.within.5.7.angio$pCqN)+
(angio.part.among$pCqN-abd.ph.part.within.6.7.angio$pCqN)+
(angio.part.among$pCqN-abd.ph.part.within.7.7.angio$pCqN)
seven.angio.ph.among.within.diff
## [1] 0.08856215