Description Usage Arguments Details Value References Examples
View source: R/specificity_scripts.R
Calculate absolute network specificity not relativized by null models.
1 | network.specificity(x, abundance.weighted = TRUE, trim = TRUE)
|
x |
Data frame. Host and symbiont data frame with hosts populating rows and symbionts populating columns. |
abundance.weighted |
Logical. TRUE calculates the Paired Difference Index per symbiont. FALSE calculates the Resource Range Index per symbiont. |
trim |
Logical. TRUE removes symbionts that occupy one host species. FALSE keeps all symbionts. |
Hosts are labeled by their species name with a period and number identifier (e.g., hostA.1) to differentiate host samples that are of the same species. This naming scheme is required because host specificity is quantified at the level of host species and not host samples. If this naming scheme does not apply to your experimental design, you should still add in identifiers (e.g., .1, .2, .3, etc.) after each host species or sample identifer.
Host specificity for a symbiont is evaluated across the entire host community. More positive values indicate a narrower symbiont niche and higher host specificity.
A data frame with symbiont identifiers and network specificity values.
Austen Apigo and Ryoko Oono. 2021. Novel metrics reveal plant abundance, but not plant evolutionary history, shape host specificity in foliar fungal symbionts. In review.
1 2 3 4 5 | # Calculate Resource Range Index per symbiont
rri <- network.specificity(comm.matrix, abundance.weighted = FALSE, trim = TRUE)
# Calculate Paired Difference Index per symbiont
pdi <- network.specificity(comm.matrix, abundance.weighted = TRUE, trim = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.