Description Usage Arguments Value Author(s) Examples
View source: R/ggboxplot_2grp.R
Boxplot based on ggplot2 of two groups and multiple numeric variables
1 | ggboxplot_2grp(data, violin = TRUE, test = "wilcox.test", nrow = 1)
|
data |
a data frame containing grouping information which only have two groups |
violin |
boolean value to indicate whether to show violin plot |
test |
the method used to compare, one of wilcox.test or t.test |
nrow |
the number of rows |
a ggplot2 plot
ZhonghuiGai
1 2 3 4 | data <- iris
colnames(data)[5] <- "group"
data <- data[1:100, ] |> droplevels()
ggboxplot_2grp(data)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.