R/helpers.R

Defines functions hh_to_period

Documented in hh_to_period

#' Half-hour to period of day
#'
#' @param x vector of datetimes.
#'
#' @return vector giving period of day.
#' @export
#' 
#' @importFrom lubridate hour minute
hh_to_period <- function(x) {
  hour(x)*60 + minute(x)/1 + 1
}
gprashal0706/chevckit documentation built on Dec. 20, 2021, 12:45 p.m.