| hillred | R Documentation |
Estimate phylogenetic or functional redundancy by fitting the saturating
relationship between neutral diversity and phylogenetic/functional diversity
across samples: y = -a * 2^(-x / b) + c. Redundancy is summarised as
1 - b / max(x).
hillred(
data,
q = c(0, 1, 2),
tree = NULL,
dist = NULL,
tau = NULL,
type = c("auto", "phylogenetic", "functional"),
reference = c("pool", "sample"),
out = c("tibble", "matrix")
)
data |
A count table (taxa x samples); requires either |
q |
Numeric vector of diversity orders (>= 0). Defaults to
|
tree |
A phylogenetic tree of class |
dist |
A functional distance matrix (or |
tau |
Optional functional distance threshold. Defaults to |
type |
Diversity type: |
reference |
Reference tree depth for phylogenetic Hill numbers
(ignored for neutral and functional types). |
out |
Output shape: |
A data.frame of class hill_redundancy (default) with a
plot() method, or a matrix with columns
redundancy, a, b, c (one row per q) when out = "matrix". The
tibble carries the per-sample neutral and phylogenetic/functional diversity
used for the fit as a "hill_fit" attribute, which the plot method draws.
hilldiv(), plot.hill_redundancy()
d <- traits2dist(gut_traits)
red <- hillred(gut_counts, dist = d)
red
plot(red)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.