| hill_acc_pq | R Documentation |
Computes Hill diversity accumulation curves from a phyloseq object
and returns a ggplot2 object.
Two types of curves are available:
type = "individual" (default): individual-based (sequence-based)
rarefaction/extrapolation curves via divent::accum_hill(), with one
curve per sample (or per merged group).
type = "sample": sample-based accumulation curve. Samples are pooled
incrementally (over random permutations) and Hill diversity is computed
at each step using divent::div_hill(). The x-axis represents the
number of samples.
hill_acc_pq(
physeq,
q = 1,
type = c("individual", "sample"),
merge_sample_by = NULL,
n_permutations = 100,
conf_level = 0.95,
...
)
physeq |
(required) a |
q |
(numeric, default 1) Hill diversity order. Default is 1 (exponential of Shannon entropy), recommended for its robustness against rare and potentially erroneous sequences (Alberdi & Gilbert, 2019; Calderón-Sanou et al., 2019). |
type |
(character) Type of accumulation curve. Either |
merge_sample_by |
(character or NULL) Variable name in
|
n_permutations |
(integer, default 100) Number of random sample
orderings used to compute the mean and confidence envelope for
sample-based accumulation. Ignored when |
conf_level |
(numeric, default 0.95) Confidence level for the
envelope around sample-based accumulation curves. Ignored when
|
... |
Additional arguments passed to |
A ggplot2 object.
Alberdi, A., & Gilbert, M. T. P. (2019). A guide to the application of Hill numbers to DNA-based diversity analyses. Molecular Ecology Resources. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1111/1755-0998.13014")}
Calderón-Sanou, I., Münkemüller, T., Boyer, F., Zinger, L., & Thuiller, W. (2019). From environmental DNA sequences to ecological conclusions: How strong is the influence of methodological choices? Journal of Biogeography, 47. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1111/jbi.13681")}
divent::accum_hill(), divent::div_hill(), hill_curves_pq()
## Not run:
# Individual (sequence-based) accumulation curves
hill_acc_pq(rarefy_pq(data_fungi_mini, sample_size = 500, replace = TRUE),
n_permutations = 3
) + no_legend()
hill_acc_pq(rarefy_pq(data_fungi_mini, sample_size = 500, replace = TRUE),
n_permutations = 3,
merge_sample_by = "Height"
)
# Sample-based accumulation curve
hill_acc_pq(data_fungi_mini, type = "sample", n_permutations = 3)
hill_acc_pq(data_fungi_mini,
type = "sample", merge_sample_by = "Height",
n_permutations = 3
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.