Learn R Programming

bizdays (version 0.2.2)

bizyearse: Business days and current days equivalence in years

Description

bizyearse is a counterparty of bizdayse which returns the amount of business days in years.

Usage

bizyearse(dates, curd, cal = bizdays.options$get("default.calendar"))

Arguments

dates
the initial dates
curd
the amount of current days
cal
an instance of Calendar

Value

numeric objects representing the amount of business days in years.

Date types accepted

The argument dates accepts 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.

Recycle rule

These arguments handle the recycle rule so a vector of dates and a vector of numbers can be provided and once those vectors differs in length the recycle rule is applied.

See Also

bizdayse for business days.

Examples

Run this code
data(holidaysANBIMA)
cal <- Calendar(holidaysANBIMA, weekdays=c("saturday", "sunday"), dib=252)
bizyearse("2013-01-02", 3, cal)

Run the code above in your browser using DataLab