# Calculate diversity
div <- alphaDiversity(ExampleDb, group="sample_id", 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")
Run the code above in your browser using DataLab