From 44522d5d82ea1c48b339433e2718b438794cb4fc Mon Sep 17 00:00:00 2001 From: wilsonfreitas Date: Wed, 4 May 2022 04:04:02 -0300 Subject: [PATCH] Documentation updated --- R/adjust.date.R | 12 ++++++------ R/bizdays.R | 6 +++--- R/bizdiff.R | 2 +- R/bizseq.R | 2 +- R/calendar.R | 2 +- R/getbizdays.R | 6 +++--- R/getdate.R | 6 +++--- R/is.bizday.R | 4 ++-- R/offset.R | 4 ++-- man/adjust.date.Rd | 12 ++++++------ man/bizdays.Rd | 4 ++-- man/bizdayse.Rd | 2 +- man/bizdiff.Rd | 2 +- man/bizseq.Rd | 2 +- man/create.calendar.Rd | 2 +- man/getbizdays.Rd | 6 +++--- man/getdate.Rd | 6 +++--- man/is.bizday.Rd | 4 ++-- man/offset.Rd | 4 ++-- 19 files changed, 44 insertions(+), 44 deletions(-) diff --git a/R/adjust.date.R b/R/adjust.date.R index 7ff9e53..6db5bcb 100644 --- a/R/adjust.date.R +++ b/R/adjust.date.R @@ -38,13 +38,13 @@ NULL #' @rdname adjust.date #' @export #' @examples -#' adjust.next("2013-01-01", "actual") +#' adjust.next("2013-01-01", "Brazil/ANBIMA") adjust.next <- function(dates, cal) UseMethod("adjust.next") #' @rdname adjust.date #' @export #' @examples -#' following("2013-01-01", "actual") +#' following("2013-01-01", "Brazil/ANBIMA") following <- function(dates, cal) UseMethod("following") #' @export @@ -79,7 +79,7 @@ following.Date <- adjust.next.Date #' @rdname adjust.date #' @export #' @examples -#' modified.following("2016-01-31", "actual") +#' modified.following("2016-01-31", "Brazil/ANBIMA") modified.following <- function(dates, cal) UseMethod("modified.following") #' @export @@ -108,13 +108,13 @@ modified.following.Date <- function(dates, #' @rdname adjust.date #' @export #' @examples -#' adjust.previous("2013-01-01", "actual") +#' adjust.previous("2013-01-01", "Brazil/ANBIMA") adjust.previous <- function(dates, cal) UseMethod("adjust.previous") #' @rdname adjust.date #' @export #' @examples -#' preceding("2013-01-01", "actual") +#' preceding("2013-01-01", "Brazil/ANBIMA") preceding <- function(dates, cal) UseMethod("preceding") #' @export @@ -149,7 +149,7 @@ preceding.Date <- adjust.previous.Date #' @rdname adjust.date #' @export #' @examples -#' modified.preceding("2016-01-01", "actual") +#' modified.preceding("2016-01-01", "Brazil/ANBIMA") modified.preceding <- function(dates, cal) UseMethod("modified.preceding") #' @export diff --git a/R/bizdays.R b/R/bizdays.R index a6a1565..16dc3da 100644 --- a/R/bizdays.R +++ b/R/bizdays.R @@ -33,10 +33,10 @@ #' \code{integer} objects representing the amount of business days. #' #' @examples -#' bizdays("2013-01-02", "2013-01-31", "actual") +#' bizdays("2013-01-02", "2013-01-31", "Brazil/ANBIMA") #' #' # Once you have a default calendar set, cal does not need to be provided -#' bizdays.options$set(default.calendar = "actual") +#' bizdays.options$set(default.calendar = "Brazil/ANBIMA") #' bizdays("2013-01-02", "2013-01-31") #' #' dates <- bizseq("2013-01-01", "2013-01-10") @@ -142,7 +142,7 @@ bizdays.Date <- function(from, to, #' rule is applied. #' #' @examples -#' bizdayse("2013-01-02", 3, "actual") +#' bizdayse("2013-01-02", 3, "Brazil/ANBIMA") #' @export bizdayse <- function(dates, curd, cal) UseMethod("bizdayse") diff --git a/R/bizdiff.R b/R/bizdiff.R index 2ef902b..a35597f 100644 --- a/R/bizdiff.R +++ b/R/bizdiff.R @@ -18,7 +18,7 @@ #' #' @examples #' dates <- c("2017-05-10", "2017-05-12", "2017-05-17") -#' bizdiff(dates, "actual") +#' bizdiff(dates, "Brazil/ANBIMA") #' @export bizdiff <- function(dates, cal) UseMethod("bizdiff") diff --git a/R/bizseq.R b/R/bizseq.R index e0d0a48..07892f4 100644 --- a/R/bizseq.R +++ b/R/bizseq.R @@ -18,7 +18,7 @@ #' objects with ISO formatted dates. #' #' @examples -#' bizseq("2013-01-02", "2013-01-31", "actual") +#' bizseq("2013-01-02", "2013-01-31", "Brazil/ANBIMA") #' @export bizseq <- function(from, to, cal) UseMethod("bizseq") diff --git a/R/calendar.R b/R/calendar.R index 60bd241..abdb0a1 100644 --- a/R/calendar.R +++ b/R/calendar.R @@ -90,7 +90,7 @@ #' "2016-03-25", "2016-04-21", "2016-05-01", "2016-05-26", "2016-09-07", #' "2016-10-12", "2016-11-02", "2016-11-15", "2016-12-25" #' )) -#' cal <- create.calendar("Brazil/ANBIMA", +#' cal <- create.calendar("ANBIMA", #' holidays = holidays, #' weekdays = c("saturday", "sunday") #' ) diff --git a/R/getbizdays.R b/R/getbizdays.R index 544e11b..394279e 100644 --- a/R/getbizdays.R +++ b/R/getbizdays.R @@ -17,14 +17,14 @@ #' #' @examples #' # for years -#' getbizdays(2022:2024, "actual") +#' getbizdays(2022:2024, "Brazil/ANBIMA") #' #' # for months -#' getbizdays("2022-12", "actual") +#' getbizdays("2022-12", "Brazil/ANBIMA") #' #' # using dates as references for months #' dts <- seq(as.Date("2022-01-01"), as.Date("2022-12-01"), by = "months") -#' getbizdays(dts, "actual") +#' getbizdays(dts, "Brazil/ANBIMA") #' @export getbizdays <- function(ref, cal = bizdays.options$get("default.calendar")) { cal <- check_calendar(cal) diff --git a/R/getdate.R b/R/getdate.R index 27c30ba..a09e574 100644 --- a/R/getdate.R +++ b/R/getdate.R @@ -41,10 +41,10 @@ #' vectors. #' #' @examples -#' getdate("10th wed", 2018, "actual") -#' getdate("last bizday", 2010:2018, "actual") +#' getdate("10th wed", 2018, "Brazil/ANBIMA") +#' getdate("last bizday", 2010:2018, "Brazil/ANBIMA") #' dts <- seq(as.Date("2018-01-01"), as.Date("2018-12-01"), "month") -#' getdate("first bizday", format(dts, "%Y-%m"), "actual") +#' getdate("first bizday", format(dts, "%Y-%m"), "Brazil/ANBIMA") #' @export getdate <- function(expr, ref, cal = bizdays.options$get("default.calendar")) { cal <- check_calendar(cal) diff --git a/R/is.bizday.R b/R/is.bizday.R index 3106b7b..ead4719 100644 --- a/R/is.bizday.R +++ b/R/is.bizday.R @@ -18,10 +18,10 @@ #' days. #' #' @examples -#' is.bizday("2013-01-02", "actual") +#' is.bizday("2013-01-02", "Brazil/ANBIMA") #' #' # Once you have a default calendar set, cal does not need to be provided -#' bizdays.options$set(default.calendar = "actual") +#' bizdays.options$set(default.calendar = "Brazil/ANBIMA") #' #' dates <- seq(as.Date("2013-01-01"), as.Date("2013-01-05"), by = "day") #' is.bizday(dates) diff --git a/R/offset.R b/R/offset.R index 406eea1..89c2287 100644 --- a/R/offset.R +++ b/R/offset.R @@ -31,10 +31,10 @@ #' @name offset #' #' @examples -#' offset("2013-01-02", 5, "actual") +#' offset("2013-01-02", 5, "Brazil/ANBIMA") #' #' # Once you have a default calendar set, cal does not need to be provided -#' bizdays.options$set(default.calendar = "actual") +#' bizdays.options$set(default.calendar = "Brazil/ANBIMA") #' #' dates <- seq(as.Date("2013-01-01"), as.Date("2013-01-05"), by = "day") #' is.bizday(dates) diff --git a/man/adjust.date.Rd b/man/adjust.date.Rd index 5aef8b5..535a6ef 100644 --- a/man/adjust.date.Rd +++ b/man/adjust.date.Rd @@ -62,10 +62,10 @@ objects with ISO formatted dates. } \examples{ -adjust.next("2013-01-01", "actual") -following("2013-01-01", "actual") -modified.following("2016-01-31", "actual") -adjust.previous("2013-01-01", "actual") -preceding("2013-01-01", "actual") -modified.preceding("2016-01-01", "actual") +adjust.next("2013-01-01", "Brazil/ANBIMA") +following("2013-01-01", "Brazil/ANBIMA") +modified.following("2016-01-31", "Brazil/ANBIMA") +adjust.previous("2013-01-01", "Brazil/ANBIMA") +preceding("2013-01-01", "Brazil/ANBIMA") +modified.preceding("2016-01-01", "Brazil/ANBIMA") } diff --git a/man/bizdays.Rd b/man/bizdays.Rd index 5395404..bbb807f 100644 --- a/man/bizdays.Rd +++ b/man/bizdays.Rd @@ -49,10 +49,10 @@ expiring maturities to the next business day, once it is not. } \examples{ -bizdays("2013-01-02", "2013-01-31", "actual") +bizdays("2013-01-02", "2013-01-31", "Brazil/ANBIMA") # Once you have a default calendar set, cal does not need to be provided -bizdays.options$set(default.calendar = "actual") +bizdays.options$set(default.calendar = "Brazil/ANBIMA") bizdays("2013-01-02", "2013-01-31") dates <- bizseq("2013-01-01", "2013-01-10") diff --git a/man/bizdayse.Rd b/man/bizdayse.Rd index 177f182..2681002 100644 --- a/man/bizdayse.Rd +++ b/man/bizdayse.Rd @@ -53,5 +53,5 @@ rule is applied. } \examples{ -bizdayse("2013-01-02", 3, "actual") +bizdayse("2013-01-02", 3, "Brazil/ANBIMA") } diff --git a/man/bizdiff.Rd b/man/bizdiff.Rd index aba4b32..7304a2b 100644 --- a/man/bizdiff.Rd +++ b/man/bizdiff.Rd @@ -29,5 +29,5 @@ objects with ISO formatted dates. \examples{ dates <- c("2017-05-10", "2017-05-12", "2017-05-17") -bizdiff(dates, "actual") +bizdiff(dates, "Brazil/ANBIMA") } diff --git a/man/bizseq.Rd b/man/bizseq.Rd index 9c9a844..5cd4e38 100644 --- a/man/bizseq.Rd +++ b/man/bizseq.Rd @@ -30,5 +30,5 @@ objects with ISO formatted dates. } \examples{ -bizseq("2013-01-02", "2013-01-31", "actual") +bizseq("2013-01-02", "2013-01-31", "Brazil/ANBIMA") } diff --git a/man/create.calendar.Rd b/man/create.calendar.Rd index d8bc1c0..4817222 100644 --- a/man/create.calendar.Rd +++ b/man/create.calendar.Rd @@ -108,7 +108,7 @@ holidays <- as.Date(c( "2016-03-25", "2016-04-21", "2016-05-01", "2016-05-26", "2016-09-07", "2016-10-12", "2016-11-02", "2016-11-15", "2016-12-25" )) -cal <- create.calendar("Brazil/ANBIMA", +cal <- create.calendar("ANBIMA", holidays = holidays, weekdays = c("saturday", "sunday") ) diff --git a/man/getbizdays.Rd b/man/getbizdays.Rd index 620cd99..495e6ec 100644 --- a/man/getbizdays.Rd +++ b/man/getbizdays.Rd @@ -26,12 +26,12 @@ reference than can be another date, a month or an year. } \examples{ # for years -getbizdays(2022:2024, "actual") +getbizdays(2022:2024, "Brazil/ANBIMA") # for months -getbizdays("2022-12", "actual") +getbizdays("2022-12", "Brazil/ANBIMA") # using dates as references for months dts <- seq(as.Date("2022-01-01"), as.Date("2022-12-01"), by = "months") -getbizdays(dts, "actual") +getbizdays(dts, "Brazil/ANBIMA") } diff --git a/man/getdate.Rd b/man/getdate.Rd index 4112da8..7a47491 100644 --- a/man/getdate.Rd +++ b/man/getdate.Rd @@ -51,8 +51,8 @@ tough task. than can be another date, a month or an year. } \examples{ -getdate("10th wed", 2018, "actual") -getdate("last bizday", 2010:2018, "actual") +getdate("10th wed", 2018, "Brazil/ANBIMA") +getdate("last bizday", 2010:2018, "Brazil/ANBIMA") dts <- seq(as.Date("2018-01-01"), as.Date("2018-12-01"), "month") -getdate("first bizday", format(dts, "\%Y-\%m"), "actual") +getdate("first bizday", format(dts, "\%Y-\%m"), "Brazil/ANBIMA") } diff --git a/man/is.bizday.Rd b/man/is.bizday.Rd index 7a3b054..a88bbc7 100644 --- a/man/is.bizday.Rd +++ b/man/is.bizday.Rd @@ -29,10 +29,10 @@ objects with ISO formatted dates. } \examples{ -is.bizday("2013-01-02", "actual") +is.bizday("2013-01-02", "Brazil/ANBIMA") # Once you have a default calendar set, cal does not need to be provided -bizdays.options$set(default.calendar = "actual") +bizdays.options$set(default.calendar = "Brazil/ANBIMA") dates <- seq(as.Date("2013-01-01"), as.Date("2013-01-05"), by = "day") is.bizday(dates) diff --git a/man/offset.Rd b/man/offset.Rd index 00541a0..54f18c8 100644 --- a/man/offset.Rd +++ b/man/offset.Rd @@ -46,10 +46,10 @@ rule is applied. } \examples{ -offset("2013-01-02", 5, "actual") +offset("2013-01-02", 5, "Brazil/ANBIMA") # Once you have a default calendar set, cal does not need to be provided -bizdays.options$set(default.calendar = "actual") +bizdays.options$set(default.calendar = "Brazil/ANBIMA") dates <- seq(as.Date("2013-01-01"), as.Date("2013-01-05"), by = "day") is.bizday(dates)