Skip to content

Commit

Permalink
Updated docs
Browse files Browse the repository at this point in the history
  • Loading branch information
wilsonfreitas committed Jan 31, 2015
1 parent 24eaf0c commit 12fe755
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 8 deletions.
28 changes: 22 additions & 6 deletions R/calendar.R
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
Expand Down Expand Up @@ -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{
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand All @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
3 changes: 3 additions & 0 deletions man/bizdays.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -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.
}

10 changes: 8 additions & 2 deletions man/bizdays.options.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down
3 changes: 3 additions & 0 deletions man/bizdayse.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -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.
}

3 changes: 3 additions & 0 deletions man/bizyears.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -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.
}
3 changes: 3 additions & 0 deletions man/bizyearse.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -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.
}

0 comments on commit 12fe755

Please sign in to comment.