This function calculates the weighted endemism for each site in a given space
Examples
if (FALSE) { # \dontrun{
# mock simulation state
space <- system.file("extdata/SouthAmerica/species_and_spaces/space_t_2.rds", package = "gen3sis2") |> readRDS()
all_species <- system.file("extdata/SouthAmerica/species_and_spaces/species_t_2.rds", package = "gen3sis2") |> readRDS()
data <- list(
space = space,
all_species = all_species
)
get_weighted_endemism(data$all_species, data$space)[255:259]
} # }