partition_metrics {bioregion}R Documentation

Calculate metrics for one or several partitions

Description

This function aims at calculating metrics for one or several partitions, usually on outputs from netclu_, hclu_ or nhclu_ functions. Metrics may require the users to provide either a similarity or dissimilarity matrix, or to provide the initial species-site table.

Usage

partition_metrics(
  cluster_object,
  dissimilarity = NULL,
  dissimilarity_index = NULL,
  net = NULL,
  site_col = 1,
  species_col = 2,
  eval_metric = c("pc_distance", "anosim", "avg_endemism", "tot_endemism")
)

Arguments

cluster_object

a bioregion.clusters object

dissimilarity

a dist object or a bioregion.pairwise.metric object (output from similarity_to_dissimilarity()). Necessary if eval_metric includes pc_distance and tree is not a bioregion.hierar.tree object

dissimilarity_index

a character string indicating the dissimilarity (beta-diversity) index to be used in case dist is a data.frame with multiple dissimilarity indices

net

the species-site network (i.e., bipartite network). Should be provided if eval_metric includes "avg_endemism" or "tot_endemism"

site_col

name or number for the column of site nodes (i.e. primary nodes). Should be provided if eval_metric includes "avg_endemism" or "tot_endemism"

species_col

name or number for the column of species nodes (i.e. feature nodes). Should be provided if eval_metric includes "avg_endemism" or "tot_endemism"

eval_metric

character string or vector of character strings indicating metric(s) to be calculated to investigate the effect of different number of clusters. Available options: "pc_distance", "anosim", "avg_endemism" and "tot_endemism"

Details

Evaluation metrics:

Value

a list of class bioregion.partition.metrics with two to three elements:

Author(s)

Boris Leroy (leroy.boris@gmail.com), Maxime Lenormand (maxime.lenormand@inrae.fr) and Pierre Denelle (pierre.denelle@gmail.com)

References

Castro-Insua A, Gómez-Rodríguez C, Baselga A (2018). “Dissimilarity measures affected by richness differences yield biased delimitations of biogeographic realms.” Nature Communications, 9(1), 9–11.

Ficetola GF, Mazel F, Thuiller W (2017). “Global determinants of zoogeographical boundaries.” Nature Ecology & Evolution, 1, 0089.

Holt BG, Lessard J, Borregaard MK, Fritz SA, Araújo MB, Dimitrov D, Fabre P, Graham CH, Graves GR, Jønsson Ka, Nogués-Bravo D, Wang Z, Whittaker RJ, Fjeldså J, Rahbek C (2013). “An update of Wallace's zoogeographic regions of the world.” Science, 339(6115), 74–78.

Kreft H, Jetz W (2010). “A framework for delineating biogeographical regions based on species distributions.” Journal of Biogeography, 37, 2029–2053.

Langfelder P, Zhang B, Horvath S (2008). “Defining clusters from a hierarchical cluster tree: the Dynamic Tree Cut package for R.” BIOINFORMATICS, 24(5), 719–720.

See Also

compare_partitions

Examples

comat <- matrix(sample(0:1000, size = 500, replace = TRUE, prob = 1/1:1001),
20, 25)
rownames(comat) <- paste0("Site",1:20)
colnames(comat) <- paste0("Species",1:25)

comnet <- mat_to_net(comat)

dissim <- dissimilarity(comat, metric = "all")

# User-defined number of clusters
tree1 <- hclu_hierarclust(dissim, n_clust = 2:20, index = "Simpson")
tree1

a <- partition_metrics(tree1, dissimilarity = dissim, net = comnet,
                       site_col = "Node1", species_col = "Node2",
                       eval_metric = c("tot_endemism", "avg_endemism",
                                      "pc_distance", "anosim"))
a


[Package bioregion version 1.1.1 Index]