isWeekday {TimeWarp} | R Documentation |
Functions for identifying and working with weekdays
nearestWeekday(x, return.dow=FALSE) filterWeekdays(x, return.dow=FALSE) isWeekday(x, return.dow=FALSE)
x |
vector of dates, either character, Date, or POSIXct or POSIXlt. |
return.dow |
if TRUE, an attribute 'dow' on the returned value will hold the day-of-week of x, with 0 being Sunday and 6 being Saturday. |
nearestWeekday()returns a vector of same type and length as x holidng the nearest weekday. The returned value can contain duplicates, and the order is the same as x.
isWeekday()returns a logical vector the length as x.
filterWeekdays()returns a vector of same type as x, but with non-weekdays and duplicates removed.