| gg_boxplot | R Documentation |
Boxplot with ggplot2
gg_boxplot(
data.tb,
x.c = "",
y.c = "",
color.c = "",
title.c = NA,
xlab.c = NA,
ylab.c = "",
label.vc = "",
palette.vc = "Set1",
size.ls = list(dot.n = 0.7, lab.i = 20, tick.i = 20, title.i = 20),
figure.c = c("interactive", "my_boxplot.pdf")[1]
)
data.tb |
Data frame (or tibble) containing the information |
x.c |
Character: name of the column with qualitative levels |
y.c |
Character: name of the column with quantitative values |
color.c |
Character: optional name of the column for color information |
title.c |
Character: plot title |
xlab.c |
Character: x label |
ylab.c |
Character: y label |
label.vc |
Character (vector): either the name of a character column from the data or a character vector of the same length as the rown number of the data, containing the feature labeling for outlier display |
palette.vc |
Character: either the name of an RColorBrewer palette (default: 'Set1'; 'Paired' can be useful for parallel plotting) or a vector manually defining the colors |
size.ls |
List of sizes for dots (default is 0.7), labels (default is 16), ticks (14) and title (20) |
figure.c |
Character: either 'interactive' for interactive display or 'my_barplot.pdf' for figure saving (only the extension matters) |
character vector of outlier labels (same dimension as the number of rows from data.tb)
sacurine.eset <- phenomis::reading(system.file("extdata/W4M00001_Sacurine-statistics", package = "phenomis"))
sacurine_pda.df <- Biobase::pData(sacurine.eset)
sacurine_pda.df <- sacurine_pda.df[!grepl("QC", rownames(sacurine_pda.df)), ]
phenomis::gg_boxplot(sacurine_pda.df, y.c = "age")
phenomis::gg_boxplot(sacurine_pda.df, x.c = "gender", y.c = "bmi", color.c = "gender")
phenomis::gg_boxplot(sacurine_pda.df, x.c = "gender", y.c = "bmi", color.c = "gender", label.vc = rownames(sacurine_pda.df))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.