View source: R/boxplot_alpha.R
boxplot_alpha | R Documentation |
Plot alpha index.
boxplot_alpha(
x,
x_var = NULL,
index = NULL,
violin = FALSE,
na.rm = FALSE,
show.points = TRUE,
zeroes = TRUE,
element.alpha = 0.5,
element.width = 0.2,
fill.colors = NA,
outlier.fill = "grey50"
)
x |
|
x_var |
Metadata variable to map to the horizontal axis. |
index |
Alpha index to plot. See function |
violin |
Use violin version of the boxplot |
na.rm |
Remove NAs |
show.points |
Include data points in the figure |
zeroes |
Include zero counts in diversity estimation. Default is TRUE |
element.alpha |
Alpha value for plot elements. Controls the transparency of plots elements. |
element.width |
Width value for plot elements. Controls the transparency of plots elements. |
fill.colors |
Specify a list of colors passed on to ggplot2
|
outlier.fill |
If using boxplot and and points together how to deal with outliers. See ggplot2 outlier.fill argument in geom_ elements. |
A simple wrapper to visualize alpha diversity index.
A ggplot
plot object
data("dietswap")
p <- boxplot_alpha(dietswap, x_var = "sex", index="observed", violin=FALSE,
na.rm=FALSE, show.points=TRUE, zeroes=TRUE,
element.alpha=0.5, element.width=0.2,
fill.colors= c("steelblue", "firebrick"),
outlier.fill="white")
p
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.