Adds stat comparison bars to a beeswarm plot of activity across specified groups

add_stats(p, df, val = q.value, y_loc = y_loc, xmin = group,
  xmax = group1)

Arguments

p

plot to add stats to

df

dataframe output from stat_activity_grouped(). Output must include columnw with names group, group1, q.value and/or p.value.

val

values to add to plot. Default is q.value from stat_activity_grouped() output

y_loc

location of comparisson bars on graph. Default it y_loc column of df. Can also be numeric values.

xmin

start location of comparison bar. Default is group column of df.

xmax

stop location of comparison bar. Default is group1 column of df.

See also

Other plot fuctions: plot_heatmap, plot_pcvariance