Learn R Programming

bizdays (version 0.2.2)

bizseq: Create a sequence of business days

Description

Returns a sequence of dates with business days only.

Usage

bizseq(from, to, cal = bizdays.options$get("default.calendar"))

Arguments

from
the initial date
to
the final date (must be greater than from)
cal
an instance of Calendar

Value

A vector of Date objects that are business days according to the provided Calendar.

Date types accepted

The arguments from and to accept Date objects and any object that returns a valid Date object when passed through as.Date, which include all POSIX* classes and character objects with ISO formatted dates.

Examples

Run this code
data(holidaysANBIMA)
cal <- Calendar(holidaysANBIMA, weekdays=c("saturday", "sunday"))
bizseq("2013-01-02", "2013-01-31", cal)

Run the code above in your browser using DataLab