Description Usage Arguments Value
ggplot2 layer to display user specified text between two samples in a bargraph. Used in conjunction with gg_bracket_between().
1 2 3 |
data |
The dataframe used in the plot |
value |
The text to be displayed |
sample_col |
Column name of the samples in data |
sample1 |
The first sample to be compared |
sample2 |
The second sample to be compared |
mean_col |
Column name of the means of the observations. Usually the y-axis of the bargraph. |
group_col |
Optional – Column name of the sample groups if applicable. Leave NA if there are no groups. |
group1 |
Optional – The group to which the first sample belongs. Leave NA if there are no groups. |
group2 |
Optional – The group to which the second sample belongs. Leave NA if there are no groups. |
dodge.width |
Optional – The width of position_dodge() in the ggplot if groups are present. Usually 0.9. |
extra_y_space |
Optional – Numeric to adjust position of the bracket up or down from its default location. |
... |
Additional optional parameters/asthetics. e.g. color for font color or size for font size. |
ggplot2 annotation layer
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.