View source: R/variable_correlation_network.R
variable_correlation_network | R Documentation |
Inputs a phyloseq-class
object and
creates a network from the co-occurrence. The co-occurrence can either be
input, or it will be calculated with the Spearman-rank correlation. Also,
the layout of the graph can be given as an argument as well for reproducibility.
variable_correlation_network(phyloseq_obj, variables, classification = NULL,
treatment = NULL, subset = NULL, correlation_table = NULL, method = 'spearman',
rho_threshold = c(-0.01, 0.01), p_threshold = 0.05, colors = 'default',
negative_positive_colors = c('tomato3', 'gray22'))
phyloseq_obj |
A |
variables |
Numerical factors within the in the
|
classification |
Column name as a string or number in the
|
treatment |
Column name as a string or number in the
|
subset |
A factor within the |
correlation_table |
Table of the correlation of taxa/variables in the
|
method |
Which correlation method to calculate, "pearson", "spearman", "kendall. |
rho_threshold |
Cutoffs to use to subset the 'correlation_table' by correlation values. |
p_threshold |
Cutoffs to use to subset the 'correlation_table' by singnificance values. |
colors |
Name of a color set from the #' RColorBrewer package or a vector palette of R accepted colors. |
negative_positive_colors |
colors to use for the edges to represent negative and positive correlations. |
ggplot-object
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.