beta.pair_geo.Rd
This function is used to calculate the Sorensen or Jaccard dissimilairty indices that have also been partitioned for community
turnover and nestedness. This function requires the package betapart
and is a wrapper for the function beta.pair()
.
beta.pair_geo(
coms,
geos = NULL,
index.family = "sorensen",
abund = FALSE,
return.mat = FALSE
)
A data frame that holds the species occurrence data with at least 4 columns of factors that holds the geographic groups, taxonomic groups, species statuses, and species binomial names.
A character equal to the column name in which the geographic groups are stored (e.g. island names or bank names)
A character that states the family of dissimilarity indices to be used. The options are "sorensen" or "jaccard".
Default is index.family = "sorensen"
Logical. If TRUE
then the Bray-Curtis Index will be returned that accounts for differences in abundance. Default is
FALSE
so that presence/absence based dissimilarity measures (i.e., family = 'sorensen'
or family = 'jaccard'
)
will be returned.
Logical, If TRUE
then the dissimilarity matrix or matrices is included in the returned list.
If FLASE
then just the data frame(s) of the pairwise beta diversity measures are returned. Default is FALSE
.
A list of length k where k is number of elements in coms
if coms
is a list (i.e. length(coms)
)
or if coms
is a data frame the list will be of the various dissimilarity metrics.
If return.mat = TRUE
, then result is a list of length 2 with the first element holding a data frame(s) of the pairwise
beta diversity measures and the second element a j x j matrix or matrices where j is the number of geographic groups you have.
In the returned list(s) there are three measures of community dissimilarity. Therefore, in each element of the returned list there are three elements (i.e. one for each kind dissimilarity index). The three idices correspond to (i) turnover (replacement), (ii) nestedness-resultant component, and (iii) total dissimilarity (i.e. the sum of both components).
For Sorensen indices (index.family = "sorensen"
each element is named "beta.sim", "beta.sne", and "beta.sor".
beta.sim
is the dissimilarity due to species turnover (i.e. Simpson pair-wise dissimilarity)
beta.sim
is the dissimilarity due to community nestedness measured as the nestedness-fraction of Sorensen pair-wise
dissimilarity
beta.sim
is the total dissimilarity between communities (i.e. Sorensen pair-wise dissimilarity)
***
For Jaccard indices (index.family = "jaccard"
each element is named "beta.jtu", "beta.jne", and "beta.jac".
beta.jtu
is the dissimilarity due to species turnover measured as the turnover-fraction of Jaccard pair-wise dissimilarity
beta.jne
is the dissimilarity due to community nestedness measured as the nestedness-fraction of Jaccard pair-wise
dissimilarity
beta.jac
is the total dissimilarity between communities (i.e. Jaccard pair-wise dissimilarity)
***
For abundance-based dissimilarity (abund = TRUE
), each element is named "beta.bray.bal", "beta.bray.gra", and "beta.bray"
beta.bray.bal
is the dissimilarity accounting for the dissimilarity derived from balanced variation in abundance
between sites
beta.bray.gra
is the dissimilarity accounting for the dissimilarity derived from unidirectional abundance gradients
beta.bray
is the total dissimilarity accounting for total abundance-based dissimilarity between sites, measured as the
Bray-Curtis index
if (FALSE) {
library(betapart)
library(here)
recs <- read.csv(file.path(here(), 'data_raw', 'IBT_Herp_Records_final.csv'), header = TRUE)
bnk_coms <- com_matrix(data = recs,
species = "binomial",
geo_group = "bank",
taxa_group = "class",
status = "stat_new",
stat_levels = c("N", "E"),
total = TRUE)
beta_div <- beta.pair_geo(coms = bnk_coms, geos = 'bank', index.family = "sorensen", return.mat = FALSE)
}