circular_hour_center: Center clock times on a circular 24-hour scale

View source: R/circular_time_mean_sd.R

circular_hour_centerR Documentation

Center clock times on a circular 24-hour scale

Description

Computes the shortest signed circular distance between clock times and a specified center hour on a 24-hour clock.

Usage

circular_hour_center(hours, center = NULL)

Arguments

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.

Details

The signed difference is defined on (-12, 12] hours, so the shortest clockwise or counterclockwise distance is used.

Value

A data frame containing centered circular distances.

Examples

circular_hour_center(c(0:24),8)  
circular_hour_center(c(NA,0:24),21) 


mMARCH.AC documentation built on June 18, 2026, 5:07 p.m.