library(terra)
data(africa)
tree <- africa$phylo
x <- africa$comm
p <- vect(system.file("ex/sa.json", package = "phyloregion"))
subphy <- match_phylo_comm(tree, x)$phy
submat <- match_phylo_comm(tree, x)$com
pbc <- phylobeta(submat, subphy)
y <- phyloregion(pbc[[1]], pol=p)
plot_NMDS(y, cex=6)
text_NMDS(y, cex=2)
plot(y, cex=1, palette="NMDS")
plot(y, cex=1)
Run the code above in your browser using DataLab