bio_boxplots: Comparison Boxplots

View source: R/bio_boxplots.R

bio_boxplotsR Documentation

Comparison Boxplots

Description

Creates boxplots showing the significance between groups. Adapted from kassambara/ggpubr.

Usage

bio_boxplots(
  data,
  x,
  y,
  p.cutoff = 0.5,
  stars = FALSE,
  method = "t.test",
  star.vals = NULL
)

Arguments

data

Data frame containing columns x and y

x, y

x and y variable names for drawing.

p.cutoff

plot p-value if above p.cutoff threshold. To include all comparisons set as NULL.

stars

Logical. Whether significance shown as numeric or stars

method

a character string indicating which method to be used for comparing means.c("t.test", "wilcox.test")

star.vals

a list of arguments to pass to the function symnum for symbolic number coding of p-values. For example, the dafault is symnum.args <- list(cutpoints = c(0, 0.0001, 0.001, 0.01, 0.05, 1), symbols = c('****', '***', '**', '*', 'ns')). In other words, we use the following convention for symbols indicating statistical significance: ns: p > 0.05; *: p <= 0.05; **: p <= 0.01; ***: p <= 0.001; ****: p <= 0.0001

Examples

bio_boxplots(iris, x="Species", y= "Sepal.Width", p.cutoff = 0.0001)
bio_boxplots(iris, x="Species", y= "Sepal.Width", NULL, stars=TRUE)

KatrionaGoldmann/BioOutputs documentation built on May 21, 2022, 1:24 p.m.