| plotDiversityTest {alakazam} | R Documentation |
plotDiversityTest plots summary data for a DiversityCurve object
with mean and a line range indicating plus/minus one standard deviation.
plotDiversityTest(data, q, colors = NULL, main_title = "Diversity",
legend_title = "Group", log_d = FALSE, annotate = c("none",
"depth"), silent = FALSE, ...)
data |
DiversityCurve object returned by alphaDiversity. |
q |
diversity order to plot the test for. |
colors |
named character vector whose names are values in the
|
main_title |
string specifying the plot title. |
legend_title |
string specifying the legend title. |
log_d |
if |
annotate |
string defining whether to added values to the group labels
of the legend. When |
silent |
if |
... |
additional arguments to pass to ggplot2::theme. |
A ggplot object defining the plot.
See alphaDiversity for generating input. Plotting is performed with ggplot.
# Calculate diversity div <- alphaDiversity(ExampleDb, group="SAMPLE", min_q=0, max_q=2, step_q=1, nboot=100) # Plot results at q=0 (equivalent to species richness) plotDiversityTest(div, 0, legend_title="Sample") # Plot results at q=2 (equivalent to Simpson's index) plotDiversityTest(div, q=2, legend_title="Sample")