options(digits=4)
data(veronica)
ver.geo <- coord2dist(coordmatrix=veronica.coord[173:207,],file.format="decimal2")
vei <- prabinit(prabmatrix=veronica[173:207,],distance="jaccard")
species <-c(rep(1,13),rep(2,22))
loggeo <- log(ver.geo+quantile(as.vector(as.dist(ver.geo)),0.25))
plotdistreg(dmx=loggeo,dmy=vei$distmat,grouping=species,
jointwithin=FALSE,jointall=FALSE,groups=c(1,2))
legend(5,0.75,c("within species 1",
"within species 2","species 1 and between","species 2 and between"),lty=c(1,1,2,2),col=c(1,2,1,2))
plotdistreg(dmx=loggeo,dmy=vei$distmat,grouping=species,
jointwithin=TRUE,jointall=TRUE,oneplusjoint=FALSE,groups=c(1,2))
legend(5,0.75,c("within species 1",
"within species 2","all distances","all within species"),lty=c(1,1,1,2),col=c(1,2,3,3))
Run the code above in your browser using DataLab