Skip to contents

Circular mean, standard deviation, variance, quasi-quantiles, mode, 95% confidence angle, standardized skewness and kurtosis

Usage

circular_summary(
  x,
  w = NULL,
  axial = TRUE,
  mode = FALSE,
  kappa = NULL,
  na.rm = FALSE
)

Arguments

x

numeric vector. Values in degrees.

w

(optional) Weights. A vector of positive numbers and of the same length as x.

axial

logical. Whether the data are axial, i.e. pi-periodical (TRUE, the default) or directional, i.e. \(2 \pi\)-periodical (FALSE).

mode

logical. Whether the circular mode should be calculated or not.

kappa

numeric. von Mises distribution concentration parameter used for the circular mode. Will be estimated using est.kappa() if not provided.

na.rm

logical value indicating whether NA values in x should be stripped before the computation proceeds.

Value

named vector

Examples

data("nuvel1")
PoR <- subset(nuvel1, nuvel1$plate.rot == "na")
sa.por <- PoR_shmax(san_andreas, PoR, "right")
circular_summary(sa.por$azi.PoR)
#>            n         mean           sd          var          25% quasi-median 
#> 1126.0000000  140.8777709   23.4183183    0.2840287  124.8495460  136.8274701 
#>          75%       median        95%CI     skewness     kurtosis            R 
#>  150.2163335  138.9450918    2.6012976   -0.1758456    1.4538046    0.7159713 
circular_summary(sa.por$azi.PoR, w = 1 / san_andreas$unc)
#>            n         mean           sd          var          25% quasi-median 
#> 1126.0000000  138.9024850   18.5799867    0.1896731  124.8436061  136.8580836 
#>          75%       median        95%CI     skewness     kurtosis            R 
#>  150.2225367  138.9450918    2.0854956   -0.3377921    2.7863614    0.8103269