AxialBoxplot {bpDir}R Documentation

AxialBoxplot

Description

Draw a boxplot for axial data

Usage

AxialBoxplot(A, template = "degrees", place = "none", marg =
                   "large", stack = FALSE, H = FALSE, shrink = 1.5, units
                   = "degrees", constant = "optimal", mirror = TRUE)

Arguments

A

numeric; a vector of class circular in units=c("degrees", "radians")

template

character; graphical parameter to set the template to be used in the plot. Options are "degrees"(default), "radians" and "geographics". If NULL, a generic template can be defined, with angles displayed according to the graphical parameter place.

place

character; graphical parameter. Active only when template = NULL to add an additional generic template either "outside" or "inside" the circle.
If place = "none"(default), no additional template is plotted.

marg

character; graphical parameter to set the plot region to either "large"(default) or "small", expressed in number of lines of text.

stack

If TRUE and H=FALSE, then far out values are stacked on the circumference.

H

logical; graphical parameter to specify if observations between the hinges and the whiskers are plotted. Default is FALSE.

shrink

numeric; graphical parameter to control the size of the plotted circle. Default is 1.5. Larger values shrink the circle, while smaller values enlarge the circle.

units

character; graphical parameter to select the unit of measure to be displayed on the axes when template = NULL and place=c("inside","outside"). Options are "degrees"(default) or "radians".

constant

numeric; the boxplot multiplying factor (or "constant") that determines how far the fences extend out from the box. When "optimal"(default), it ensures the probability that an observation falls outside the fences (i.e., it will be a far out value) is 0,7% under a von Mises distribution (see Web Appendix A in Buttarazzi et al., 2018).

mirror

If TRUE, then a second axial boxplot will be plotted on the opposite semi-circle.

Details

The arguments stack, shrink are parameters passed to plot.circular.

Value

farout

a vector of class circular in radians, containing the values of the points lying outside the whiskers.

constant

the value of the constant used to draw the boxplot.

Author(s)

Davide Buttarazzi

References

Buttarazzi D., Pandolfo G., Porzio G.C. (2018). A boxplot for circular data, Biometrics.

Examples

set.seed(1)
#install.packages("circular")
require(circular)
#install.packages("plotrix")
require(plotrix)
theta <- circular::rvonmises(100, circular(pi/2), 3, control.circular=list(units="radians"))
axialTheta <- circular(theta, modulo = "pi")
AxialBoxplot(axialTheta, template = "radians", mirror = FALSE)

[Package bpDir version 0.1.2 Index]