# \donttest{
tamiasEPM
tamiasEPM <- addPhylo(tamiasEPM, tamiasTree)
tamiasEPM <- addTraits(tamiasEPM, tamiasTraits)
# taxonomic turnover
beta_taxonomic_turnover <- betadiv_taxonomic(tamiasEPM, radius = 70000,
component = 'turnover')
beta_taxonomic_nestedness <- betadiv_taxonomic(tamiasEPM, radius = 70000,
component = 'nestedness')
beta_taxonomic_full <- betadiv_taxonomic(tamiasEPM, radius = 70000,
component = 'full')
oldpar <- par(mfrow = c(1, 3))
plot(beta_taxonomic_turnover, reset = FALSE, key.pos = NULL)
plot(beta_taxonomic_nestedness, reset = FALSE, key.pos = NULL)
plot(beta_taxonomic_full, reset = FALSE, key.pos = NULL)
# using square grid epmGrid
tamiasEPM2 <- createEPMgrid(tamiasPolyList, resolution = 50000,
cellType = 'square', method = 'centroid')
beta_taxonomic_full <- betadiv_taxonomic(tamiasEPM2, radius = 70000,
component = 'full')
beta_taxonomic_full_slow <- betadiv_taxonomic(tamiasEPM2, radius = 70000,
component = 'full', slow = TRUE)
par(mfrow=c(1,2))
terra::plot(beta_taxonomic_full, col = sf::sf.colors(100))
terra::plot(beta_taxonomic_full_slow, col = sf::sf.colors(100))
# dissimilarity from a focal cell
focalBeta <- betadiv_taxonomic(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