Alternative method to calculate alpha taxonomic diversity
Examples
# \donttest{
library(terra)
bin1 <- terra::rast(system.file("extdata", "ref.tif",
package = "divraster"))
spat.alpha2(bin1)
#> class : SpatRaster
#> dimensions : 8, 8, 1 (nrow, ncol, nlyr)
#> resolution : 0.125, 0.125 (x, y)
#> extent : 0, 1, 0, 1 (xmin, xmax, ymin, ymax)
#> coord. ref. : lon/lat WGS 84 (EPSG:4326)
#> source(s) : memory
#> name : Richness
#> min value : 2
#> max value : 8
# }