Description Usage Arguments Details Value Examples
Calculated the correlation between a specified continuous variable and some taxa measure. Correlation type and taxa measure (count, relative abundance, etc.) can be specified by the user but is "spearman" and relative abundance, respectively, by default
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
micro_set |
A tidy_micro data set |
table |
The OTU table |
... |
Continuous variables of interest |
y |
The taxa information: cts, ra, etc. The centered log ratio (clr) is recommended. |
method |
Correlation type; must be supported by |
main |
Plot title |
xlab |
x-axis label |
ylab |
y-axis label |
subtitle |
Plot label |
legend_title |
Title for the legend |
low_grad |
Colors for the corelation magnitude. Will be fed into scale_fill_gradient |
high_grad |
Colors for the corelation magnitude. Will be fed into scale_fill_gradient |
The output will give gray columns if there are missing values in the supplied continuous variable
Returns a ggplot that you can add geoms to if you'd like
1 2 3 4 5 6 7 8 | data(bpd_phy); data(bpd_cla); data(bpd_ord); data(bpd_fam); data(bpd_clin)
otu_tabs <- list(Phylum = bpd_phy, Class = bpd_cla,
Order = bpd_ord, Family = bpd_fam)
set <- tidy_micro(otu_tabs = otu_tabs, clinical = bpd_clin) %>%
filter(day == 7) ## Only including the first week
set %>% cor_heatmap(table = "Class", gestational_age, weight)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.