Learn R Programming

bdscale (version 2.0.0)

bd2t: Transform Dates into your business-date scale.

Description

Transform Dates into your business-date scale.

Usage

bd2t(dates, business.dates)

Arguments

dates
a Date vector for which you want to transform each date into an integer t which is the number of business days after the first date in your business.dates vector
business.dates
a vector of Date objects, sorted ascending

Value

returns an integer vector where each element is the number of business days t after the first date in your business.dates vector

Examples

Run this code
monday <- as.Date('2014-10-13')
weekdays <- monday + 0:4
bd2t(monday + c(1, 3), weekdays)

Run the code above in your browser using DataLab