项目作者: wilsonfreitas

项目描述 :
Business Days Calculations and Utilities
高级语言: R
项目地址: git://github.com/wilsonfreitas/R-bizdays.git
创建时间: 2013-09-01T14:17:15Z
项目社区:https://github.com/wilsonfreitas/R-bizdays

开源协议:Other

下载


" class="reference-link">R-bizdays

CRAN status
Lifecycle: stable
Downloads
R-CMD-check
Coverage status

bizdays computes business days between dates based on collections of
nonworking days and nonworking weekdays (usually weekends). It also
helps with other issues related to business days calculations like check
whether a date is a business day, offset a date by a number of business
days, adjust dates for the next or previous business day, create
generators of business days sequences, and much more. All functions are
vectorizable so that speed up the calculations for large collections of
dates.

Installing

It is available on CRAN to
be installed through:

  1. install.packages('bizdays')

or using devtools

  1. devtools::install_github('R-bizdays', username='wilsonfreitas')

Calendars

bizdays comes with these calendars already loaded:

  1. library(bizdays)
  2. #>
  3. #> Attaching package: 'bizdays'
  4. #> The following object is masked from 'package:stats':
  5. #>
  6. #> offset
  7. calendars()
  8. #> Calendars:
  9. #> actual, Brazil/ANBIMA, Brazil/B3, weekends

You can simply call bizdays declaring one of these.

  1. following("2022-01-01", "Brazil/B3")
  2. #> [1] "2022-01-03"
  3. bizdays("2022-04-01", "2022-04-29", "Brazil/ANBIMA")
  4. #> [1] 18