From 12fe7554d060b9e42fac654df0b45f1b3328a67b Mon Sep 17 00:00:00 2001 From: wilsonfreitas Date: Sat, 31 Jan 2015 04:24:00 -0200 Subject: [PATCH] Updated docs --- R/calendar.R | 28 ++++++++++++++++++++++------ man/bizdays.Rd | 3 +++ man/bizdays.options.Rd | 10 ++++++++-- man/bizdayse.Rd | 3 +++ man/bizyears.Rd | 3 +++ man/bizyearse.Rd | 3 +++ 6 files changed, 42 insertions(+), 8 deletions(-) diff --git a/R/calendar.R b/R/calendar.R index 320d674..b2bef59 100644 --- a/R/calendar.R +++ b/R/calendar.R @@ -256,6 +256,9 @@ adjust.previous.Date <- function(dates, cal=bizdays.options$get('default.calenda #' @return #' \code{integer} objects representing the amount of business days. #' +#' @seealso +#' \code{\link{bizyears}} for business days values in years. +#' #' @examples #' data(holidaysANBIMA) #' cal <- Calendar(holidaysANBIMA, weekdays=c("saturday", "sunday")) @@ -520,13 +523,17 @@ new_defaults <- function(value=list()) { #' #' \code{bizdays.options} defines option parameters used internally in \code{bizdays}. #' -#' @usage +#' @format +#' A \code{list} object with \emph{methods} \code{get} and \code{set} attached to. +#' +#' @details +#' Parameters are stored in \code{bizdays.options} using \code{get} and \code{set} +#' +#' \preformatted{ #' bizdays.options$set(option.key=value) #' bizdays.options$get("option.key") +#' } #' -#' @format A \code{list} object with \emph{methods} \code{get} and \code{set} attached to. -#' -#' @details #' \code{bizdays} supports the following parameter: #' #' \itemize{ @@ -584,6 +591,9 @@ bizdays.options$set(default.calendar=Calendar(name="Actual/365", dib=365)) #' numbers can be provided and once those vectors differs in length the recycle #' rule is applied. #' +#' @seealso +#' \code{\link{bizyearse}} for business days in years. +#' #' @examples #' data(holidaysANBIMA) #' cal <- Calendar(holidaysANBIMA, weekdays=c("saturday", "sunday"), dib=252) @@ -621,6 +631,9 @@ bizdayse.Date <- function(dates, curd, cal=bizdays.options$get('default.calendar #' @param to the final dates #' @param cal an instance of \code{Calendar} #' +#' @return +#' \code{numeric} objects representing the amount of business days in years. +#' #' @section Date types accepted: #' #' The arguments \code{from} and \code{to} accept \code{Date} objects and any @@ -643,8 +656,8 @@ bizdayse.Date <- function(dates, curd, cal=bizdays.options$get('default.calendar #' A common and useful setting is \code{adjust.to=adjust.next} which moves #' expiring maturities to the next business day, once it is not. #' -#' @return -#' \code{numeric} objects representing the amount of business days in years. +#' @seealso +#' \code{\link{bizdays}} for business days. #' #' @examples #' data(holidaysANBIMA) @@ -693,6 +706,9 @@ bizyears.Date <- function(from, to, cal=bizdays.options$get('default.calendar')) #' numbers can be provided and once those vectors differs in length the recycle #' rule is applied. #' +#' @seealso +#' \code{\link{bizdayse}} for business days. +#' #' @examples #' data(holidaysANBIMA) #' cal <- Calendar(holidaysANBIMA, weekdays=c("saturday", "sunday"), dib=252) diff --git a/man/bizdays.Rd b/man/bizdays.Rd index 10cda39..2ec22ae 100644 --- a/man/bizdays.Rd +++ b/man/bizdays.Rd @@ -59,4 +59,7 @@ bizdays("2013-01-02", "2013-01-31") dates <- bizseq("2013-01-01", "2013-01-10") bizdays(dates, "2014-01-31") } +\seealso{ +\code{\link{bizyears}} for business days values in years. +} diff --git a/man/bizdays.options.Rd b/man/bizdays.options.Rd index 4c481d55..0fb3ebd 100644 --- a/man/bizdays.options.Rd +++ b/man/bizdays.options.Rd @@ -5,13 +5,19 @@ \title{bizdays' options} \format{A \code{list} object with \emph{methods} \code{get} and \code{set} attached to.} \usage{ -bizdays.options$set(option.key=value) -bizdays.options$get("option.key") +bizdays.options } \description{ \code{bizdays.options} defines option parameters used internally in \code{bizdays}. } \details{ +Parameters are stored in \code{bizdays.options} using \code{get} and \code{set} + +\preformatted{ +bizdays.options$set(option.key=value) +bizdays.options$get("option.key") +} + \code{bizdays} supports the following parameter: \itemize{ diff --git a/man/bizdayse.Rd b/man/bizdayse.Rd index 2a7ed5e..aa3d6d3 100644 --- a/man/bizdayse.Rd +++ b/man/bizdayse.Rd @@ -54,4 +54,7 @@ data(holidaysANBIMA) cal <- Calendar(holidaysANBIMA, weekdays=c("saturday", "sunday"), dib=252) bizdayse("2013-01-02", 3, cal) } +\seealso{ +\code{\link{bizyearse}} for business days in years. +} diff --git a/man/bizyears.Rd b/man/bizyears.Rd index 9211907..b348262 100644 --- a/man/bizyears.Rd +++ b/man/bizyears.Rd @@ -60,4 +60,7 @@ data(holidaysANBIMA) cal <- Calendar(holidaysANBIMA, weekdays=c("saturday", "sunday"), dib=252) bizyears("2013-01-02", "2013-01-31", cal) } +\seealso{ +\code{\link{bizdays}} for business days. +} diff --git a/man/bizyearse.Rd b/man/bizyearse.Rd index ec28593..7812b9e 100644 --- a/man/bizyearse.Rd +++ b/man/bizyearse.Rd @@ -40,4 +40,7 @@ data(holidaysANBIMA) cal <- Calendar(holidaysANBIMA, weekdays=c("saturday", "sunday"), dib=252) bizyearse("2013-01-02", 3, cal) } +\seealso{ +\code{\link{bizdayse}} for business days. +}