group_box {pcutils}R Documentation

Plot a boxplot

Description

Plot a boxplot

Usage

group_box(
  tab,
  group = NULL,
  metadata = NULL,
  mode = 1,
  group_order = NULL,
  facet_order = NULL,
  alpha = FALSE,
  method = "wilcox",
  alpha_param = list(color = "red"),
  point_param = NULL,
  p_value1 = FALSE,
  p_value2 = FALSE,
  only_sig = TRUE,
  stat_compare_means_param = NULL,
  trend_line = FALSE,
  trend_line_param = list(color = "blue")
)

Arguments

tab

your dataframe

group

which colname choose for group or a vector

metadata

the dataframe contains the group

mode

1~9, plot style, try yourself

group_order

the order of x group

facet_order

the order of the facet

alpha

whether plot a group alphabeta by test of method

method

test method:wilcox, tukeyHSD, LSD, (default: wilcox), see multitest

alpha_param

parameters parse to geom_text

point_param

parameters parse to geom_jitter

p_value1

multi-test of all group

p_value2

two-test of each pair

only_sig

only_sig for p_value2

stat_compare_means_param

parameters parse to stat_compare_means

trend_line

add a trend line

trend_line_param

parameters parse to geom_smooth

Value

a ggplot

Examples

a <- data.frame(a = 1:18, b = runif(18, 0, 5))
group_box(a, group = rep(c("a", "b", "c"), each = 6))

[Package pcutils version 0.2.5 Index]