Usage
group.diversity(data, meta, factors="", indices="", diversity.info=FALSE, x.axis=NULL, compare=NULL, facet=NULL, facet.y=TRUE, facet.x.cex=NULL, facet.y.cex=NULL, scale.free=NULL, xlab=NULL, ylab=NULL, legend.title=NULL, legend.labels=NULL, file=NULL, ext=NULL, width=8, height=8)
Arguments
meta
the metadata table to be used (must have same samples as
data
.
factors
a character vector. Must be variables in the metadata
indices
a character vector. Must be one or more of the following:
"spec", "sim", "invsim", "shan", "sim_even", "shan_even",
"sim_trudiv", "shan_trudiv", "chao", "ACE". See also
OTU.diversity, true.diversity
,
evenness
, and diversity
.
diversity.info
logical. Whether the diversity indices have calculated and
included in the metadata table. The diversity indices should be
processed by OTU.diversity
for the same otu tables
and metadata table.
x.axis
optional. If NULL
, will use the first variable in
factors
; otherwise, must be one factor in the metadata or
'SampleID'
compare
optional. If NULL
, will use the first variable in
factors
; otherwise, must be one factor in the metadata
facet
optional. If provided, must be one factor in the metadata or
'SampleID'
facet.y
logical, whether the facet
being used as strip text of y
axis or x axis.
facet.x.cex
optional, an integer, the font size of the stip.text.x
in
ggplot
facet.y.cex
optional, an integer, the font size of the strip.text.y
in ggplot
.
scale.free
optional. Whether use free scale for y axis.
xlab
optional. If not provided, the x.axis
will be used as the
title of the x axis, otherwise, will use the provided string.
ylab
optional. If not provided, "value" will be used as the
title of the y axis, otherwise, will use the provided string.
legend.title
optional. If not provided, compare
will be used as the
title of the legend, otherwise, will use the provided string.
legend.labels
optional. If not provided, will use the levels of compare
for the legends, otherwise, will use the provided vector of
strings. The length of the provided vector of strings must
equals to the levels of compare
.
file
the filename to save the plot.
ext
the extention (file type) of the plot to saved.
width
the width of the plot to be saved.
height
the heigth of the plot to be saved.