is.hkHoliday: Calculate Hong Kong public holidays

Description Usage Arguments Value Note See Also Examples

Description

This function is to determine the Date object in x are public holidays in Hong Kong

Usage

1
is.hkHoliday(x, push = TRUE, withSunday = TRUE)

Arguments

x

Vector of Date object

push

Boolean, to push the public holidays in Sunday to the nearest workday

withSunday

Boolean, also included all Sundays as public holidays

Value

logical vector

Note

very slow despite memoisation is used

See Also

hkHoliday

Examples

1
2
3
data(hkweiboscope)
hkweiboscope$hkHoliday <- is.hkHoliday(hkweiboscope$date)
plot(x=hkweiboscope$date, y=hkweiboscope$count, col=ifelse(hkweiboscope$hkHoliday, 2, 1))

chainsawriot/hongkong documentation built on May 13, 2019, 3:11 p.m.