Description Usage Arguments Value Author(s) Examples
View source: R/cor_rocky_mtn.R
Calculate the correlation between the relative abundance of each taxa within a specified table and a continuous variable of interest. Correlation is calculated by cor
. By default, Kendall's correlation is used to account for the prevalence of ties that often occur (lots of 0s)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
micro_set |
A tidy_micro data set |
table |
OTU table of interest |
x |
Continuous variable of interest |
y |
The taxa information. The centered log ratio (clr) is recommended. |
method |
Correlation type; must be supported by |
main |
Plot title |
xlab |
Lable for x-axis |
ylab |
Label for y-axis |
subtitle |
Plot subtitle |
cut_lines |
Add lines for p-value cutoffs |
line_text |
Label p-value cut-offs |
sig_text |
Label taxa with correlations greater than |
lwd |
line width for cut_lines |
cor_label |
Cutoff for correlations to be labeled |
seed |
Seed for random placement of label |
breaks |
Where to place cut_lines along y-axis |
A ggplot you can add geoms to if you'd like
Charlie Carpenter, Dan Frank
1 2 3 4 5 6 7 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.