View source: R/hill_func_parti_pairwise.R
hill_func_parti_pairwise | R Documentation |
Calculate pairwise functional gamma, alpha, and beta diversity for communities, as
well as site similarity. It is based on hill_func_parti
.
If comm has >2 sites, this function will give results for all pairwise comparisons.
hill_func_parti_pairwise(
comm,
traits,
traits_as_is = FALSE,
q = 0,
rel_then_pool = TRUE,
output = c("data.frame", "matrix"),
pairs = c("unique", "full"),
.progress = TRUE,
show_warning = TRUE,
...
)
comm |
A data frame of vegetation data. Sites as rows, species as columns. |
traits |
A data frame of species functional traits data. Species as rows, traits as columns. It can include both continuous and categorical data. It will be transformed into a distance matrix using 'FD::gowdis(traits)'. If all traits are numeric, then it will use Euclidean distance. |
traits_as_is |
if |
q |
Hill number, |
rel_then_pool |
default is |
output |
output type: data.frame (default) or matrix. If matrix, then this function will return a list of matrices. |
pairs |
full or unique (default). Do you want to compare all possible pairs (i.e. n^2) or just unique pairs (i.e. |
.progress |
Whether to show progress bar. Default is 'TRUE'. |
show_warning |
whether to print warning, default is |
... |
additional arguments for |
a data frame with results for all pairwise comparisons.
Chao, Anne, Chun-Huo Chiu, and Lou Jost. Unifying Species Diversity, Phylogenetic Diversity, Functional Diversity, and Related Similarity and Differentiation Measures Through Hill Numbers. Annual Review of Ecology, Evolution, and Systematics 45, no. 1 (2014): 297–324. <doi:10.1146/annurev-ecolsys-120213-091540>.
Chiu, Chun-Huo, and Anne Chao. Distance-Based Functional Diversity Measures and Their Decomposition: A Framework Based on Hill Numbers. PLoS ONE 9, no. 7 (July 7, 2014): e100014. <doi:10.1371/journal.pone.0100014>.
hill_func_parti
## Not run:
dummy = FD::dummy
hill_func_parti_pairwise(comm = dummy$abun, traits = dummy$trait, q = 0)
hill_func_parti_pairwise(comm = dummy$abun, traits = dummy$trait, q = 0,
output = 'matrix')
hill_func_parti_pairwise(comm = dummy$abun, traits = dummy$trait, q = 0,
output = 'matrix', pairs = 'full')
hill_func_parti_pairwise(comm = dummy$abun, traits = dummy$trait, q = 1)
hill_func_parti_pairwise(comm = dummy$abun, traits = dummy$trait, q = 0.9999)
hill_func_parti_pairwise(comm = dummy$abun, traits = dummy$trait, q = 2)
hill_func_parti_pairwise(comm = dummy$abun, traits = dummy$trait, q = 3)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.