boxpl: boxplot

Description Usage Arguments Details Author(s) References Examples

View source: R/boxpl_function.R

Description

Creates a boxplot for every taxon observed 10 or more times. The plot is created with ggplot2.

Usage

1
boxpl(samp, tax, var, xlab = "Gradient", xmin = NULL, xmax = NULL, quantiles = T, log = F, colvline = "red", medlty = "solid", Qlty = "dashed", mintax = 10)

Arguments

samp

A vector containing codes for each sample.

tax

A vector containing names or codes for the different taxa/groups.

var

A numeric vector containing the variables of an environmental gradient.

xlab

The label of the x-axis. Default is "Gradient".

xmin

A numeric argument that defines the minimal value of the x-axis. Default is NULL.

xmax

A numeric argument that defines the maximum value of the x-axis. Default is NULL.

quantiles

An argument that states if the 25, 50 and 75 percent quantiles of each unique sample are displayed in the the plot. Default is TRUE.

log

An argument that can be used to set the x-axis to Log scale. Default is FALSE.

colvline

An character argument that determines the colour of the vertical ablines according to the ggplot2 colour pallet. Default is "red".

medlty

An character argument that determines the linetype of the vertical abline indicating the median of all unique samples, according to ggplot2. Default is "solid"

Qlty

An character argument that determines the linetype of the vertical ablines indicating the 25 and 75 percentile of all unique samples, according to ggplot2. Default is "dashed"

mintax

An argument removes taxa with less than the given integer value. By default only taxa with more than 10 occurences are displayed.

Details

Returns a boxplot for every taxon observed more then 10 times. Taxon are displayed on the y-axis with the number of observations in ascending order along the gradient (according to the mean). Additionally, the median of each unique sample with the 25 and 75 percentiles are displayed as vertical ablines.

Author(s)

Willem Kaijser

References

Wickham, H., 2009. ggplot2: Elegant Graphics for Data Analysis. Springer-Verlag New York.

Examples

1
2
3
4
## Not run: 
#Using the provided data-set named "hco3"
boxpl(hco3$Sample, hco3$Taxon, hco3$Variable)
## End(Not run)

snwikaij/GRASS documentation built on July 29, 2020, 1:54 p.m.