plot_specs_stacks | R Documentation |
Visualizes results from phy_or_env_spec as stacked histograms. Aliased to plot_specificities() for backward compatibility.
plot_specs_stacks(
specs_list,
n_bins = 20,
col_sig = "black",
col_nsig = "gray",
col_bord = NA,
alpha = 0.05,
label_cex = 1
)
specs_list |
list of data.frames. Each data.frame must be an output from phy_or_env_spec; must have columns "Spec" and "Pval". |
n_bins |
integer. Number of bins for stacked violins (default: 20). |
col_sig |
string. Color name or hex code for species where Pval <= alpha (default: "black"). |
col_nsig |
string. Color name or hex code for species where Pval > alpha (default: "gray"). |
col_bord |
string. Color name or hex code for border color. Use NA for no border (default: NA). |
alpha |
float. alpha value for determining statistical significance; see col_sig and col_nsig above (default: 0.05). |
label_cex |
float. Used to change size of x-axis labels (default: 1). |
returns nothing (a plot is made).
John L. Darcy
# library(specificity)
# attach(endophyte)
# # only analyze species with occupancy >= 20
# m <- occ_threshold(prop_abund(otutable), 20)
# # create list to hold phy_or_env_spec outputs
# specs_list <- list()
# specs_list$NDVI <- phy_or_env_spec(m, env=metadata$NDVI,
# n_cores=10, n_sim=50, p_method="gamma_fit")
# specs_list$Evapotranspiration <- phy_or_env_spec(m,
# env=metadata$Evapotranspiration, n_cores=10,
# n_sim=100, p_method="gamma_fit")
# specs_list$Rainfall <- phy_or_env_spec(m, env=metadata$Rainfall,
# n_cores=10, n_sim=50, p_method="gamma_fit")
# plot_specs_stacks(specs_list)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.