bd2t {bdscale}R Documentation

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

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


[Package bdscale version 2.0.0 Index]