Learn R Programming

EpiWeek (version 1.1)

epiweekToDate: Convert Epidemiological Weeks to Calendar Dates

Description

This function returns the beginning and end dates for a given epidemiological week. By definition, the first epidemiological week of the year contains at least four days in January.

Usage

epiweekToDate(year, weekno, firstday = "Sunday")

Arguments

year
A four digits numerical value for the epidemiological year
weekno
A two digits numerical value for the epidemiological week
firstday
A character string specifying the beginning weekday for each epidemiological week. The default for the firstday methods is "Sunday".

Value

d0
Beginning date for this epidemiological week
d1
End date for this epidemiological week

Examples

Run this code
epiweekToDate(2013,34)
epiweekToDate(2011,40,firstday="Monday")

Run the code above in your browser using DataLab