Computes the spherical median of a data set on the circle.

1 2 |

`P` |
The data as a vector, a matrix, a data frame or a list. |

`sort` |
Logical; TRUE indicates that the data in |

`depths` |
For Tukey's method only; An optionnal vector of the same length as P that contains the Tukey depth of each data. The calculation of the depth is then skipped and the provided values are used instead. |

`alpha` |
For Tukey's method only; |

`method` |
Character string which determines the depth function used. |

`tracecontour` |
Only if |

`tracepoints` |
Only if |

Calculates shperical medians for data on the circle only. The input must be a list of angles in radians between 0 and *2π* (polar coordinates). If `method="Tukey"`

, the Tukey median is returned. If `method="Circular"`

, the circular median (the point minimizing the average distance based on arccosine) is returned.

A numeric value between *0* and *2π* giving the median in polar coordinate.

Maxime Genest.

Liu, R.Y., Parelius, J.M. and Singh, K. (1999), Multivariate analysis by data depth: Descriptive statistics, graphics and inference (with discussion), *Ann. Statist.*, **27**, 783–858.

Mardia, K.V. and Jupp, E.J. (1999). *Directional Statistics*, Wiley.

`sdepth`

for calculation of the depth of a point, `scontour`

for Tukey's spherical median.

1 2 3 |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.