Plot a boxplot
group_box(
tab,
group = NULL,
metadata = NULL,
mode = 1,
group_order = NULL,
facet_order = NULL,
facet_ncol = NULL,
paired = FALSE,
paired_line_param = list(),
alpha = FALSE,
method = "wilcox",
alpha_param = list(),
point_param = NULL,
p_value1 = FALSE,
p_value2 = FALSE,
only_sig = TRUE,
stat_compare_means_param = NULL,
trend_line = FALSE,
trend_line_param = list()
)
your dataframe
which colname choose for group or a vector
the dataframe contains the group
1~9, plot style, try yourself
the order of x group
the order of the facet
number of columns in facet, if NULL, will use the default value of ggplot2
if paired is TRUE, points in different groups will be connected by lines. So the row names order is important.
parameters parse to geom_line
.
whether plot a group alphabeta by test of method
test method:wilcox, tukeyHSD, LSD, (default: wilcox), see multitest
parameters parse to geom_text
parameters parse to geom_point
,
multi-test of all group
two-test of each pair
only_sig for p_value2
parameters parse to stat_compare_means
add a trend line
parameters parse to geom_smooth
a ggplot
a <- data.frame(a = 1:18, b = runif(18, 0, 5))
group_box(a, group = rep(c("a", "b", "c"), each = 6))