tcR (version 1.1)

vis.group.boxplot: Boxplot for groups of observations.

Description

Plot boxplots for each group.

Usage

vis.group.boxplot(.data, .groups = list(A = c("A1", "A2"), D = c("D1", "D2"),
  C = c("C1", "C2")), .labs = c("V segments", "Frequency"), .title = "",
  .rotate.x = T, ...)

Arguments

.data
Either a matrix with colnames and rownames specifyed or a data frame with the first column of strings for row names and other columns stands for values.
.groups
Named list with character vector for names of elements for each group. If NA than each member is in the individual group.
.labs
Labs names. Character vector of length 1 (for naming both axis with same name) or 2 (first elements stands for x-axis).
.title
Main title of the plot.
.rotate.x
If T than rotate x-axis.
...
Parameters passed to melt, applied to .data before plotting in vis.group.boxplot.

Value

  • ggplot object.

Examples

Run this code
names(immdata)  # "A1" "A2" "B1" "B2" "C1" "C2"
# Plot a boxplot for V-usage for each plot
# three boxplots for each group.
vis.group.boxplot(freq.Vb(immdata),
   list(A = c('A1', 'A2'), B = c('B1', 'B2'), C = c('C1', 'C2')),
   c('V segments', 'Frequency'))

Run the code above in your browser using DataLab