var_par_pq {MiscMetabar} | R Documentation |
Partition the Variation of a phyloseq object by 2, 3, or 4 Explanatory Matrices
Description
The function partitions the variation in otu_table using
distance (Bray per default) with respect to two, three, or four explanatory
tables, using
adjusted R² in redundancy analysis ordination (RDA) or distance-based
redundancy analysis. If response is a single vector, partitioning is by
partial regression. Collinear variables in the explanatory tables do NOT
have to be removed prior to partitioning. See vegan::varpart()
for more
information.
Usage
var_par_pq(
physeq,
list_component,
dist_method = "bray",
dbrda_computation = TRUE
)
Arguments
physeq |
(required): a |
list_component |
(required) A named list of 2, 3 or four vectors with
names from the |
dist_method |
(default "bray") the distance used. See
|
dbrda_computation |
(logical) Do dbrda computations are runned for each individual component (each name of the list component) ? |
Details
This function is mainly a wrapper of the work of others.
Please make a reference to vegan::varpart()
if you
use this function.
Value
an object of class "varpart", see vegan::varpart()
Author(s)
Adrien Taudière
See Also
var_par_rarperm_pq()
, vegan::varpart()
, plot_var_part_pq()
Examples
if (requireNamespace("vegan")) {
data_fungi_woNA <-
subset_samples(data_fungi, !is.na(Time) & !is.na(Height))
res_var <- var_par_pq(data_fungi_woNA,
list_component = list(
"Time" = c("Time"),
"Size" = c("Height", "Diameter")
),
dbrda_computation = TRUE
)
}