View source: R/mobr_boxplots.R
plot_comm_div | R Documentation |
Plots the community diversity metrics from produced by the function
calc_comm_div
. The p-value for each statistic
is displayed in the plot title if applicable.
plot_comm_div(
comm_div,
index = NULL,
multi_panel = FALSE,
col = c("#FFB3B5", "#78D3EC", "#6BDABD", "#C5C0FE", "#E2C288", "#F7B0E6", "#AAD28C"),
cex.axis = 1.2,
...
)
comm_div |
a table that is output by |
index |
The biodiversity statistics that should be plotted.
See |
multi_panel |
A logical variable. If |
col |
a vector of colors for the groups, set to NA if no color is preferred |
cex.axis |
The magnification to be used for axis annotation relative to the current setting of cex. Defaults to 1.2. |
... |
additional arguments to provide to |
The user may specify which results to plot or simply to plot all the results.
Felix May, Xiao Xiao, and Dan McGlinn
library(dplyr)
data(tank_comm)
data(tank_plot_attr)
indices <- c('N', 'S', 'S_C', 'S_n', 'S_PIE')
tank_div <- tibble(tank_comm) |>
group_by(group = tank_plot_attr$group) |>
group_modify(~ calc_comm_div(.x, index = indices, effort = 5,
extrapolate = TRUE))
# plot the community metrics
plot_comm_div(tank_div, index = "S")
plot_comm_div(tank_div, index = "S_n")
# or plot all of the indices at once with
plot_comm_div(tank_div)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.