pick_week: For each week specified by a vector of dates giving the week...

Description Usage Arguments Value

View source: R/datetime-utils.R

Description

For each week specified by a vector of dates giving the week start dates, determine whether the week contains a specified date.

Usage

1
pick_week(week_start_date, year_to_pick, month_to_pick, day_to_pick)

Arguments

week_start_date

A vector of Date objects specifying the date of the first day in the weeks of interest

year_to_pick

integer or character giving the year to pick, e.g. "2010"

month_to_pick

integer or character giving the month to pick, e.g. "12"

day_to_pick

integer or character giving the day to pick, e.g. "22"

Value

a logical vector of the same length as time. Entry i is TRUE if the week beginning on week_start_date[i] contains the date specified by year_to_pick, month_to_pick, and day_to_pick; FALSE otherwise.


reichlab/cdcfluutils documentation built on March 12, 2020, 2:49 p.m.