addPlotStats | R Documentation |
Use ggpubr to add statistics to plots.
addPlotStats(
p,
comp.group,
metadata,
h.adj = 0.05,
primary.test,
secondary.test,
exact = FALSE
)
p |
Plot to add statistics to. |
comp.group |
Comparison metric. |
metadata |
Metadata for samples. |
h.adj |
Position of statistics test p value as % of max(y) (default = 0.05). |
primary.test |
Primary statistical test, e.g. "anova", "kruskal.test". |
secondary.test |
Secondary statistical test, e.g. "t-test", "wilcox.test" |
exact |
Whether to calculate exact p values (default = FALSE). |
ggplot2 object
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.