Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
R
 
 
 
 
man
 
 
 
 
 
 
 
 
 
 
 
 

README.md

liburrr: Indonesia holiday R package

Libur telah tiba, libur telah tiba 🎵🎵🎵

liburrr is an R package which contains functionality related to holiday date in Indonesia. The name of liburrr with three 'r' is inspired with R package purrr.

Installation

# install.packages("devtools")
devtools::install_github("rasyidstat/liburrr")

Example

library(liburrr)
library(dplyr)
df <- data.frame(dt = seq.Date(as.Date("2020-01-01"), as.Date("2020-01-07"), "day") )
df <- df %>%
  mutate(weekend_flag = is_weekend(dt),
         holiday_flag = is_libur(dt),
         holiday_flag_all = ifelse(weekend_flag == FALSE, holiday_flag, weekend_flag),
         holiday_desc = is_libur(dt, label = TRUE))
df
#>           dt weekend_flag holiday_flag holiday_flag_all      holiday_desc
#> 1 2020-01-01        FALSE         TRUE             TRUE Tahun Baru Masehi
#> 2 2020-01-02        FALSE        FALSE            FALSE              <NA>
#> 3 2020-01-03        FALSE        FALSE            FALSE              <NA>
#> 4 2020-01-04         TRUE        FALSE             TRUE              <NA>
#> 5 2020-01-05         TRUE        FALSE             TRUE              <NA>
#> 6 2020-01-06        FALSE        FALSE            FALSE              <NA>
#> 7 2020-01-07        FALSE        FALSE            FALSE              <NA>

About

Indonesia holiday R package

Resources

Releases

No releases published

Packages

No packages published

Languages