gg_bracket_between: Draw bracket between samples

Description Usage Arguments Value

Description

ggplot2 layer to draw a bracket between two samples in a bargraph. Used in conjunction with gg_ttest_between().

Usage

1
2
3
gg_bracket_between(data, sample_col, sample1, sample2, mean_col,
  group_col = NA, group1 = NA, group2 = NA, dodge.width = 0.9,
  extra_y_space = 0, ...)

Arguments

data

The dataframe used in the plot

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 dependent variable means. 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.

Value

ggplot2 annotation layer


azzoam/ggBrackets documentation built on May 11, 2019, 5:20 p.m.