Learn R Programming

tcR (version 2.3.2)

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

Description

Plot boxplots for each group.

Usage

vis.group.boxplot(
  .data,
  .groups = NA,
  .labs = c("V genes", "Frequency"),
  .title = "",
  .rotate.x = T,
  .violin = T,
  .notch = F,
  ...
)

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 vectors 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 then rotate x-axis.

.violin

If T then plot a violin plot.

.notch

"notch" parameter to the geom_boxplot ggplo2 function.

...

Parameters passed to melt, applied to .data before plotting in vis.group.boxplot.

Value

ggplot object.

Examples

Run this code
# NOT RUN {
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'))

data(twb)
ov <- repOverlap(twb)
sb <- matrixSubgroups(ov, list(tw1 = c('Subj.A', 'Subj.B'), tw2 = c('Subj.C', 'Subj.D')));
vis.group.boxplot(sb)
# }

Run the code above in your browser using DataLab