round2wday: Round a date to the nearest specified weekday

Description Usage Arguments Details Value

View source: R/round2wday.R

Description

round2wday rounds a date to the nearest target weekday.

Usage

1
round2wday(date, targetwday)

Arguments

date

Date, POSIXct, POSIXlt, or character string the the format "YYYY-MM-DD"

targetwday

Target weekday

Details

Target weekday can be specified as a named weekday or its numerical equivalent, from the following table:

Name Number
Sunday 1
Monday 2
Tuesday 3
Wednesday 4
Thursday 5
Friday 6
Saturday 7
cdcweek.start 1
cdcweek.end 7
isoweek.start 2
isoweek.end 1

Value

Date ("YYYY-MM-DD")


allopole/tycho2 documentation built on Dec. 26, 2019, 2:48 a.m.