Description Usage Arguments Value Examples
Test for dates of working days, with options to define weekends and whether to exclude public holiday off-in-lieu.
1 | is.workday(date, oil = T, weekend = c("Sat", "Sun"))
|
date |
A date vector to be tested. |
oil |
Logical. Default |
weekend |
Vector of days to define weekend. Default include Sat and Sun. |
A logical vector indicating working day or not.
1 2 3 4 5 6 7 | library(dplyr)
library(lubridate)
library(sgholidays)
data.frame(cal = seq.Date(ymd(20130101), ymd(20130401), 1) ) %>%
dplyr::mutate(day = lubridate::wday(cal, TRUE)) %>%
mutate(is_ph = is.ph(cal, TRUE)) %>%
mutate(is_workday = is.workday(cal, TRUE))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.