Holidays-package: Supplies holiday data to the TimeWarp package.

Description Note Author(s) See Also Examples

Description

This package is a data-only package that registers holidays with the TimeWarp package. The package has no visible functions or data; it works by calling registerHolidays() from its .onLoad() function.

Note

To create a package with custom holidays (or updated holidays for the holiday series defined in here), either modify the source code of this package, or copy commands from R/holidays.R into a new package.

Author(s)

Jeffrey Horner, Lars Hansen, Tony Plate

Maintainer: Tony Plate tplate@acm.org

See Also

From the TimeWarp package: holidays, registerHolidays, allHolidays.

Examples

1
2
3
# View counts of registered holidays by year
sapply(as.character(1998:2012), function(y)
       sapply(allHolidays(), function(h) length(holidays(y, h, silent=TRUE))))

Example output

Loading required package: TimeWarp
              1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010
AUSEX            7    8    8    8    8    8    8    8    8    8    8    7    8
GBREX            9    9    8    8    9    8    8    8    8    8    8    8    2
HKGEX           14   14   13   18   14   13   13   13   13   15   17   12   12
JPNEX           14   16   12   15   15   16   16   15   13   18   17   20   18
JPNEX.halfday    0    0    0    0    0    2    2    2    3    0    0    0    0
KOREX           21   21   24   16   20   17   19   11   11    1    0    0    0
NEWYEAR          1    2    0    1    1    1    2    0    1    1    1    1    2
NONE             0    0    0    0    0    0    0    0    0    0    0    0    0
NYSE             9    9    8    9    9    9    9    8    9    9    9    9    9
NYSE.Closings    0    0    0    4    0    0    1    0    0    1    0    0    0
NYSE.halfday     0    0    0    0    0    4    0    0    0    0    0    0    0
NYSEC            9    9    8   13    9    9   10    8    9   10    9    9    9
NYSELong         9    9    8   13    9    9   10    8    9   10    9    9    9
NYSEPre70s       0    0    0    0    0    0    0    0    0    0    0    0    0
NewYears         1    1    1    1    1    1    1    1    1    1    1    1    1
USFed           10   11    9   10   10   10   11    9   10   10   10   10   11
              2011 2012
AUSEX            8    8
GBREX            0    1
HKGEX           14   14
JPNEX           18   19
JPNEX.halfday    0    0
KOREX            0    0
NEWYEAR          0    1
NONE             0    0
NYSE             8    9
NYSE.Closings    0    2
NYSE.halfday     0    0
NYSEC            8   11
NYSELong         8   11
NYSEPre70s       0    0
NewYears         1    1
USFed            9   10

Holidays documentation built on May 2, 2019, 5:06 a.m.