R/time_formula functions.R

Defines functions hour weekday intercept

Documented in hour intercept weekday

#' hour
#'
#' @param x a timestamp
#'
#' @export
hour <- function(x) {
  as.factor(lubridate::hour(x))
}


#' weekday
#'
#' @param x a timestamp
#'
#' @export
weekday <- function(x) {
  as.factor(lubridate::wday(x))
}

#' intercept
#'
#' @param x a timestamp
#'
#' @export
intercept <- function(x) {
  as.factor(x)
}
maxikellerbauer/stAirPol documentation built on May 3, 2019, 3:16 p.m.