index_by_friday: Find the Friday in a given week

Description Usage Arguments Value Examples

View source: R/utils.R

Description

Find the Friday in a given week from a sequence of Dates Vectors should be in as.Date() format

Usage

1

Arguments

dates

vector of dates

Value

The date of the Friday in the week of the given date

Examples

1
2
3
4
dates <- seq.Date(from = as.Date("2020-09-21"),
                  by = "week", length.out = 10)
fridays <- index_by_friday(dates)
weekdays(fridays)

macroeconomicdata/dateutils documentation built on Dec. 21, 2021, 12:51 p.m.