rose_stats {tectonicr} | R Documentation |
Show Average Direction and Spread in Rose Diagram
Description
Adds the average direction (and its spread) to an existing rose diagram.
Usage
rose_stats(
x,
weights = NULL,
axial = TRUE,
avg = c("mean", "median"),
spread = c("CI", "sd", "IQR"),
avg.col = "#85112AFF",
avg.lty = 2,
avg.lwd = 1.5,
spread.col = ggplot2::alpha("#85112AFF", 0.2),
spread.border = FALSE,
spread.lty = NULL,
spread.lwd = NULL,
add = TRUE,
...
)
Arguments
x |
Data to be plotted. A numeric vector containing angles (in degrees). |
weights |
Optional vector of numeric weights associated with x. |
axial |
Logical. Whether data are uniaxial ( |
avg |
character. The average estimate for x. Either the circular mean
( |
spread |
character. The measure of spread to be plotted as a fan.
Either the 95% confidence interval ( |
avg.col |
color for the average line |
avg.lty |
line type of the average line |
avg.lwd |
line width of the average line |
spread.col |
color of the spread fan |
spread.border |
logical. Whether to draw a border of the fan or not. |
spread.lty |
line type of the spread fan's border |
spread.lwd |
line width of the spread fan's border |
add |
logical. |
... |
optional arguments to |
Value
No return value, called for side effects
See Also
rose()
for plotting the rose diagram, and
circular_mean()
, circular_median()
, confidence_interval()
,
circular_sd()
, circular_IQR()
for statistical parameters.
Examples
data("san_andreas")
rose(san_andreas$azi, weights = 1 / san_andreas$unc, muci = FALSE)
rose_stats(san_andreas$azi, weights = 1 / san_andreas$unc, avg = "median", spread = "IQR")