View source: R/circular_time_mean_sd.R
| circular_hour_center | R Documentation |
Computes the shortest signed circular distance between clock times and a specified center hour on a 24-hour clock.
circular_hour_center(hours, center = NULL)
hours |
Numeric vector of hours. |
center |
Center hour. If NULL, circular mean is used by minimizing the total squared circular distance on a 24-hour clock. |
The signed difference is defined on (-12, 12] hours, so the
shortest clockwise or counterclockwise distance is used.
A data frame containing centered circular distances.
circular_hour_center(c(0:24),8)
circular_hour_center(c(NA,0:24),21)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.