mmwr_week_to_date: Convert an MMWR year+week or year+week+day to a Date object

View source: R/mmwr-map.r

mmwr_week_to_dateR Documentation

Convert an MMWR year+week or year+week+day to a Date object

Description

This is a reformat and re-export of a function in the MMWRweek package. It provides a snake case version of its counterpart and produces a vector of Date objects that corresponds to the input MMWR year+week or year+week+day vectors. This also adds some parameter checking and cleanup to avoid exceptions.

Usage

mmwr_week_to_date(year, week, day = NULL)

Arguments

year, week, day

Year, week and month vectors. All must be the same length unless day is NULL.

Value

vector of Date objects

Examples

mwd <- mmwr_week_to_date(2016,10,3)

hrbrmstr/cdcfluview documentation built on Nov. 25, 2022, 7:55 p.m.