boxVDJ | R Documentation |
boxVDJ
creates a box plot of the specified diversity.
boxVDJ(d, ...)
## S4 method for signature 'matrix'
boxVDJ(
d,
sampleGroups = NULL,
method = c("shannon", "simpson", "invsimpson", "chao1", "chaobunge"),
title = NULL,
legend = FALSE
)
d |
A |
... |
additional arguments. |
sampleGroups |
A |
method |
Identifies the type of diversity that is to be plotted. |
title |
Character vector with an optional title. |
legend |
If TRUE, a legend will be included with the plot. If FALSE, no legend is included in the plot. |
Returns a ggplot
plot with a box plot that shows the
diversity for each sample. A box plot is created for each of the
grouping variables. The individual diversity measures are
plotted on the box plots.
data('contigs')
x <- clonoStats(contigs)
d <- calculateDiversity(x)
sampleGroups <- data.frame(Sample = c("sample1", "sample2"),
Group = c("Cancer", "Normal"))
boxVDJ(d, sampleGroups = sampleGroups, method = "shannon",
title = "Shannon diversity", legend = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.