R/jul_day.R

#' Create julian day from date time column
#'
#' @param dt_col Vector of dates
#'
#' @return vector of integers
#' @export
#'
#' @examples
#' tst <- tibble::tibble(
#'   dates = Sys.time()
#' )
#'
#' jul_day(tst$dates)
jul_day <- function(dt_col){

  out <- as.integer(format(dt_col, "%j"))

return(out)
}
Huh/CamoMismatch documentation built on May 20, 2019, 4:25 p.m.