add_days_before: Add Dates of 1:n Days Before Given Dates

Description Usage Arguments Examples

View source: R/create_date_ranges.R

Description

Add Dates of 1:n Days Before Given Dates

Usage

1
add_days_before(dates, n_days_before = 1)

Arguments

dates

vector of Date objects

n_days_before

number of days to add before the days given in dates

Examples

1
2
3
4
5
6
dates <- as.Date(c("2019-07-05", "2019-07-10"))
fhpredict:::add_days_before(dates)
fhpredict:::add_days_before(dates, n_days_before = 2)

# Duplicates are removed so that unique dates are returned
fhpredict:::add_days_before(dates, n_days_before = 10)

KWB-R/fhpredict documentation built on Nov. 1, 2020, 5:58 a.m.