ggboxplot_facet: Draw box plot based on ggplot2, using data containing...

Description Usage Arguments Value Author(s) Examples

View source: R/ggboxplot_facet.R

Description

Draw box plot based on ggplot2, using data containing grouping info. Can draw multiple variables

Usage

1
2
3
4
5
6
7
8
9
ggboxplot_facet(
  data,
  comparisons = NULL,
  test = "wilcox.test",
  x.text.angle = 45,
  map_signif_level = TRUE,
  tip_length = 0,
  textsize_sifnif = 4
)

Arguments

data

A data frame that containing the grouping info and multiple numeric variables.

comparisons

a list that indicated which group to be compared.

test

he method that used for significant test, one of "t.test" and "wilcox.test". The default method is "wilcox.test".

x.text.angle

A numeric number indicated the angle of axix.test.x.

map_signif_level

A logic value

tip_length

the length of tip, default is 0

textsize_sifnif

the text size of signifcant

Value

a ggplot2 object

Author(s)

Zhonghui Gai

Examples

1
2
3
4
5
data <- iris
colnames(data)[5] <- "group"
ggboxplot_facet(data, map_signif_level = T, comparisons = list(c("setosa", "versicolor"),
c("versicolor", "virginica"),
c("setosa", "virginica"))) + ggsci::scale_fill_aaas()

ZhonghuiGai/ggroup documentation built on Dec. 18, 2021, 8:28 p.m.