MMWRweek {MMWRweek}R Documentation

MMWR day, week, and year

Description

This function returns the MMWR day, week, and year for the Date(s) provided.

Usage

MMWRweek(date)

Arguments

date

vector which can be coerced to class Date

Details

The first day of any MMWR week is Sunday. MMWR week numbering is sequential beginning with 1 and incrementing with each week to a maximum of 52 or 53. MMWR week #1 of an MMWR year is the first week of the year that has at least four days in the calendar year. For example, if January 1 occurs on a Sunday, Monday, Tuesday or Wednesday, the calendar week that includes January 1 would be MMWR week #1. If January 1 occurs on a Thursday, Friday, or Saturday, the calendar week that includes January 1 would be the last MMWR week of the previous year (#52 or #53). Because of this rule, December 29, 30, and 31 could potentially fall into MMWR week #1 of the following MMWR year.

Value

data.frame with elements MMWRday (of the week), MMWRweek, and MMWRyear

Author(s)

Jarad Niemi niemi@iastate.edu

References

http://wwwn.cdc.gov/nndss/document/MMWR_Week_overview.pdf

See Also

MMWRweekday, MMWRweek2Date

Examples

y = as.Date(paste(1999:2011, "-12-31", sep = ""))
cbind(y, MMWRweek(y))

[Package MMWRweek version 0.1.3 Index]