Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New functions bizdayseq, bizyears and bizyearseq #13

Closed
wilsonfreitas opened this issue May 12, 2014 · 1 comment
Closed

New functions bizdayseq, bizyears and bizyearseq #13

wilsonfreitas opened this issue May 12, 2014 · 1 comment

Comments

@wilsonfreitas
Copy link
Owner

The calendar object should hold the days-in-base value to compute the period in years.
And bizdayseq is a short cut to current days equivalence.

bizdayseq <- function(dates, curd) {
    dates <- as.Date(dates)
    bizdays(dates, dates+curd)
}

bizyears <- function(from, to) bizdays(from, to)/252

bizyearseq <- function(dates, curd) bizdayseq(dates, curd)/252
wilsonfreitas added a commit that referenced this issue May 16, 2014
wilsonfreitas added a commit that referenced this issue May 16, 2014
wilsonfreitas added a commit that referenced this issue May 16, 2014
wilsonfreitas added a commit that referenced this issue May 16, 2014
@wilsonfreitas
Copy link
Owner Author

All functions implemented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant