# \donttest{
tamiasEPM
tamiasEPM <- addPhylo(tamiasEPM, tamiasTree)
# phylogenetic turnover
beta_phylo_turnover <- betadiv_phylogenetic(tamiasEPM, radius = 70000,
component = 'turnover')
beta_phylo_nestedness <- betadiv_phylogenetic(tamiasEPM, radius = 70000,
component = 'nestedness')
beta_phylo_full <- betadiv_phylogenetic(tamiasEPM, radius = 70000,
component = 'full')
oldpar <- par(mfrow=c(1,3))
plot(beta_phylo_turnover, reset = FALSE, key.pos = NULL)
plot(beta_phylo_nestedness, reset = FALSE, key.pos = NULL)
plot(beta_phylo_full, reset = FALSE, key.pos = NULL)
# using square grid epmGrid
tamiasEPM2 <- createEPMgrid(tamiasPolyList, resolution = 50000,
cellType = 'square', method = 'centroid')
tamiasEPM2 <- addPhylo(tamiasEPM2, tamiasTree)
beta_phylo_full <- betadiv_phylogenetic(tamiasEPM2, radius = 70000,
component = 'full')
beta_phylo_full_slow <- betadiv_phylogenetic(tamiasEPM2, radius = 70000,
component = 'full', slow = TRUE)
par(mfrow = c(1,2))
terra::plot(beta_phylo_full, col = sf::sf.colors(100))
terra::plot(beta_phylo_full_slow, col = sf::sf.colors(100))
# dissimilarity from a focal cell
focalBeta <- betadiv_phylogenetic(tamiasEPM, radius = 70000,
component = 'full', focalCoord = c(-1413764, 573610.8))
plot(focalBeta, reset = FALSE)
points(-1413764, 573610.8, pch = 3, col = 'white')
par(oldpar)
# }
Run the code above in your browser using DataLab