isoweekStart: Calculate the start date of a given ISO week

View source: R/isoweekStart.R

isoweekStartR Documentation

Calculate the start date of a given ISO week

Description

This function takes a vector of ISO week numbers (of the form YYYYWW) and returns a Date vector with the first Monday of each week. It is essentially the inverse function of isoweek.

Usage

isoweekStart(x)

Arguments

x

A numeric vector of ISO week numbers (of format YYYYWW)

Value

A vector of class Date and length equal to x, containing the start date (first Monday) of each ISO week. NA (with a warning) if ISO week is invalid.

Examples

isoweek(201740) # Start of 2017-18 influenza surveillance
isoweekStart(isoweek(Sys.Date()))


thlytras/Rivets documentation built on April 16, 2024, 5:43 a.m.