View source: R/Graph_Boxplots.R
| Graph_boxplots | R Documentation |
Visualizes the distribution of continuous tracer variables across sources and mixtures. It displays summary statistics (median, hinges, whiskers) alongside individual outliers.
Graph_boxplots(
data,
tracers = 1:(ncol(data) - 2),
ncol = 3,
colors = NULL,
seed = NULL
)
boxPlot(
data,
tracers = 1:(ncol(data) - 2),
ncol = 3,
colors = NULL,
seed = NULL
)
box_plot(
data,
tracers = 1:(ncol(data) - 2),
ncol = 3,
colors = NULL,
seed = NULL
)
data |
Data frame containing source and mixture data in the standard format. |
tracers |
Numeric vector. Indices of the tracers to plot (1 refers to the first tracer column). Default is 1 to (ncol(data) - 2). |
ncol |
Integer. Number of plot columns per row in the grid layout. Default is 3. |
colors |
Character vector. Optional hex codes or color names for custom boxplot colors. Default is NULL. |
seed |
Integer. Random seed for reproducible jittering or sampling. Default is NULL. |
Invisibly returns the combined plot grid object created by gridExtra::grid.arrange().
data <- data.frame(
ID = paste0("S", 1:12),
Group = rep(c("SourceA", "SourceB", "Mixture"), each = 4),
Tracer1 = c(10, 12, 11, 13, 20, 22, 21, 23, 15, 16, 15, 17),
Tracer2 = c(5, 6, 5, 7, 15, 14, 16, 15, 10, 11, 10, 12)
)
Graph_boxplots(data, tracers = 1:2, ncol = 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.