Learn R Programming

bizdays (version 1.0.10)

calendar-register: Calendars register

Description

Every calendar created with create.calendar is stored in the calendar register. The idea behind this register is allowing calendars to be accessed by its names.

Usage

calendars()

remove_calendars(cals)

has_calendars(cals)

Arguments

cals

character vector of calendars names

Details

calendars returns the object which represents the calendars register. Since the register inherits from environment, the calendars are retrieved with the [[ operator. But the register object has its own print generic which helps listing all registered calendars.

remove_calendars remove calendars from the register.

Examples

Run this code
# NOT RUN {
# ACTUAL calendar
cal <- create.calendar("Actual")
cal <- calendars()[["Actual"]]
remove_calendars("Actual")
# lists registered calendars
calendars()
has_calendars(c("actual", "weekends"))
# }

Run the code above in your browser using DataLab