R/get.epiweek.R

Defines functions get.epiweek

Documented in get.epiweek

#' create epidemiological calendar
#'
#' @keywords internal
get.epiweek <- function(i.date = as.POSIXct(as.POSIXlt(Sys.Date()), tz = "CET")) {
  create.calendar(i.date - 60 * 60 * 24 * 400, i.date + 60 * 60 * 24 * 400) %>%
    purrr::pluck("calendar") %>%
    dplyr::filter(date == i.date)
}

Try the mem package in your browser

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

mem documentation built on July 9, 2023, 6:34 p.m.