add_day_of_week: Adds a day of the week vector

add_day_of_weekR Documentation

Adds a day of the week vector

Description

Adds a day of the week vector

Usage

add_day_of_week(dates, week_effect = 7)

Arguments

dates

Vector of dates

week_effect

Numeric from 1 to 7 defaults to 7

Value

A numeric vector containing the period day of the week index

Examples

## Not run: 
dates <- seq(as.Date("2020-03-15"), by = "days", length.out = 15)
# Add date based day of week
add_day_of_week(dates, 7)

# Add shorter week
add_day_of_week(dates, 4)

## End(Not run)

EpiNow2 documentation built on Oct. 31, 2024, 5:09 p.m.