R/iriweek_to_date.R

Defines functions iriweek_to_date

Documented in iriweek_to_date

#' Transforms the iri week to actual date
#' @export
#' @param iri_week numeric variable
iriweek_to_date <- function(iri_week) {
  # Transform iri_week to date
  d <- iri_week*7+29100
  ndate <- as.Date(d, origin = "1899-12-30")
  return(ndate)
}
uogss/CLV documentation built on Jan. 29, 2021, 1:50 p.m.