View source: R/circular_time_mean_sd.R
| circular_time_mean_sd | R Documentation |
A function for calculating the circular average timing and circular standard deviation of time variables measured on a 24-hour clock. Times larger than 24 hours are wrapped onto the 24-hour scale using modulo arithmetic. The function also returns signed deviations from a specified center, or from the circular mean if center is not provided.
circular_time_mean_sd(times, unit_to_minute = 60, out = c("mean", "sd"))
times |
|
unit_to_minute |
|
out |
|
The circular mean is computed 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 list with:
meanCircular mean of the input times, in hours.
sdCircular standard deviation of the input times, in hours.
circular_time_mean_sd(c(1, 2, 3, 21, 20, 23))
circular_time_mean_sd(c(23, 1, 2) )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.