Title: | Boxplots for Directional Data |
---|---|
Description: | Functions for drawing boxplots for data on (the boundary of) a unit circle (i.e., circular and axial data), from Buttarazzi D., Pandolfo G., Porzio G.C. (2018) <doi:10.1111/biom.12889>. |
Authors: | Davide Buttarazzi [aut, cre] |
Maintainer: | Davide Buttarazzi <[email protected]> |
License: | GPL-2 |
Version: | 0.1.2 |
Built: | 2025-02-24 03:01:12 UTC |
Source: | https://github.com/cran/bpDir |
Draw a boxplot for axial data
AxialBoxplot(A, template = "degrees", place = "none", marg = "large", stack = FALSE, H = FALSE, shrink = 1.5, units = "degrees", constant = "optimal", mirror = TRUE)
AxialBoxplot(A, template = "degrees", place = "none", marg = "large", stack = FALSE, H = FALSE, shrink = 1.5, units = "degrees", constant = "optimal", mirror = TRUE)
A |
numeric; a vector of class circular in |
template |
character; graphical parameter to set the template to be used in the plot. Options are |
place |
character; graphical parameter. Active only when |
marg |
character; graphical parameter to set the plot region to either |
stack |
If |
H |
logical; graphical parameter to specify if observations between the hinges and the whiskers are plotted. Default is |
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 |
constant |
numeric; the boxplot multiplying factor (or "constant") that determines how far the fences extend out from the box. When |
mirror |
If |
The arguments stack
, shrink
are parameters passed to plot.circular.
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. |
Davide Buttarazzi
Buttarazzi D., Pandolfo G., Porzio G.C. (2018). A boxplot for circular data, Biometrics.
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)
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)
The CircularBoxplot function produces a box-and-whisker-plot for circular data.
CircularBoxplot ( A, template="degrees", place="none", units="degrees", marg= "large", shrink = 1.5, H=FALSE, stack=FALSE, constant= "optimal")
CircularBoxplot ( A, template="degrees", place="none", units="degrees", marg= "large", shrink = 1.5, H=FALSE, stack=FALSE, constant= "optimal")
A |
numeric; a vector of class circular in |
template |
character; graphical parameter to set the template to be used in the plot. Options are |
place |
character; graphical parameter. Active only when |
units |
character; graphical parameter to select the unit of measure to be displayed on the axes when |
marg |
character; graphical parameter to set the plot region to either |
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. |
H |
logical; graphical parameter to specify if observations between the hinges and the whiskers are plotted. Default is |
stack |
If |
constant |
numeric; the boxplot multiplying factor (or "constant") that determines how far the fences extend out from the box. When |
The arguments stack
, shrink
are parameters passed to plot.circular.
farout |
a vector of class circular in radians, containing the values of the points lying outside the whiskers. |
statistics |
a dataframe of summary statistics in degrees: circular median, hinges and whiskers. |
constant |
the value of the constant used to draw the boxplot. |
Davide Buttarazzi
Buttarazzi D., Pandolfo G., Porzio G.C. (2018). A boxplot for circular data, Biometrics.
# Circular Boxplot on Vanishing directions of homing pigeons #install.packages("circular") #install.packages("plotrix") require(circular) require(plotrix) #help(fisherB12c) data(fisherB12c) CircularBoxplot(fisherB12c, template="geographics")
# Circular Boxplot on Vanishing directions of homing pigeons #install.packages("circular") #install.packages("plotrix") require(circular) require(plotrix) #help(fisherB12c) data(fisherB12c) CircularBoxplot(fisherB12c, template="geographics")
Empirical depth ranking based on Tukey’s ranking procedure (Tukey, 1977) adapted to the circular setting (Buttarazzi et al, 2018).
CircularTukeyDepth(x)
CircularTukeyDepth(x)
x |
numeric; a vector of class |
depth |
a two column matrix of circular observations with corresponding depth value |
median |
the depth-based circular median as an object of class |
iqr |
the depth-based circular inter-quartile range as an object of class |
Davide Buttarazzi
Buttarazzi D., Pandolfo G., Porzio G.C. (2018). A boxplot for circular data, Biometrics.
Tukey, J. W. (1977). Exploratory Data Analysis. MA: AddisonWesley, Reading (UK).
CircularBoxplot
#install.packages("circular") require(circular) data1 <- rvonmises(50, circular(pi/2), 5) CircularTukeyDepth(data1)
#install.packages("circular") require(circular) data1 <- rvonmises(50, circular(pi/2), 5) CircularTukeyDepth(data1)