R/noleap_yday.R

Defines functions noleap_yday

Documented in noleap_yday

#' Compute year of the day ingoring Feb 29
#' 
#' @param x date
noleap_yday <- function(x){
  requireNamespace("lubridate")
  ifelse(lubridate::leap_year(x) & lubridate::month(x)>2,
         lubridate::yday(x)-1,
         lubridate::yday(x))
}

Try the excessmort package in your browser

Any scripts or data that you put into this service are public.

excessmort documentation built on Oct. 11, 2021, 9:06 a.m.