Commit 8a701e19 authored by Reinhold Kainhofer's avatar Reinhold Kainhofer

Make package check happy (typos etc.)

parent 799385ff
...@@ -47,7 +47,7 @@ mortalityTable.improvementFactors = setClass( ...@@ -47,7 +47,7 @@ mortalityTable.improvementFactors = setClass(
#' Calculate the improvement factors for the given birth-year and the #' Calculate the improvement factors for the given birth-year and the
#' \code{\linkS4class{mortalityTable.improvementsFactors}} object #' \code{\linkS4class{mortalityTable.improvementFactors}} object
#' #'
#' @param object A pension table object (instance of a \code{\linkS4class{mortalityTable.improvementFactors}} class) #' @param object A pension table object (instance of a \code{\linkS4class{mortalityTable.improvementFactors}} class)
#' @param ... Currently unused #' @param ... Currently unused
...@@ -56,21 +56,21 @@ mortalityTable.improvementFactors = setClass( ...@@ -56,21 +56,21 @@ mortalityTable.improvementFactors = setClass(
#' #'
#' @examples #' @examples
#' pensionTables.load("USA_PensionPlan_RP2014") #' pensionTables.load("USA_PensionPlan_RP2014")
#' calculateImprovements(RP2014.male, YOB = 2017) #' calculateImprovements(RP2014.male@qx, YOB = 2017)
#' #'
#' @exportMethod calculateImprovements #' @exportMethod calculateImprovements
setGeneric("calculateImprovements", function(object, ...) standardGeneric("calculateImprovements")); setGeneric("calculateImprovements", function(object, ...) standardGeneric("calculateImprovements"));
#' @describeIn calculateImprovements Calculate the total mortality improvement #' @describeIn calculateImprovements Calculate the total mortality improvement
#' factors relative to the base year for the given birth-year and the #' factors relative to the base year for the given birth-year and the
#' \code{\linkS4class{mortalityTable.improvementsFactors}} object #' \code{\linkS4class{mortalityTable.improvementFactors}} object
setMethod("calculateImprovements", "mortalityTable.improvementFactors", setMethod("calculateImprovements", "mortalityTable.improvementFactors",
function(object, ..., Period = NULL, YOB = 1982) { function(object, ..., Period = NULL, YOB = 1982) {
if (is.array(object@improvement)) { if (is.array(object@improvement)) {
# All years outside the observation interval use the improvements # All years outside the observation interval use the improvements
# at the boundaries # at the boundaries
minObservation = strtoi(head(colnames(object@improvement), 1)) minObservation = strtoi(utils::head(colnames(object@improvement), 1))
maxObservation = strtoi(tail(colnames(object@improvement), 1)) maxObservation = strtoi(utils::tail(colnames(object@improvement), 1))
if (!missing(Period) && !is.null(Period)) { if (!missing(Period) && !is.null(Period)) {
# Period improvements: # Period improvements:
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
\alias{calculateImprovements} \alias{calculateImprovements}
\alias{calculateImprovements,mortalityTable.improvementFactors-method} \alias{calculateImprovements,mortalityTable.improvementFactors-method}
\title{Calculate the improvement factors for the given birth-year and the \title{Calculate the improvement factors for the given birth-year and the
\code{\linkS4class{mortalityTable.improvementsFactors}} object} \code{\linkS4class{mortalityTable.improvementFactors}} object}
\usage{ \usage{
calculateImprovements(object, ...) calculateImprovements(object, ...)
...@@ -23,17 +23,17 @@ calculateImprovements(object, ...) ...@@ -23,17 +23,17 @@ calculateImprovements(object, ...)
} }
\description{ \description{
Calculate the improvement factors for the given birth-year and the Calculate the improvement factors for the given birth-year and the
\code{\linkS4class{mortalityTable.improvementsFactors}} object \code{\linkS4class{mortalityTable.improvementFactors}} object
} }
\section{Methods (by class)}{ \section{Methods (by class)}{
\itemize{ \itemize{
\item \code{mortalityTable.improvementFactors}: Calculate the total mortality improvement \item \code{mortalityTable.improvementFactors}: Calculate the total mortality improvement
factors relative to the base year for the given birth-year and the factors relative to the base year for the given birth-year and the
\code{\linkS4class{mortalityTable.improvementsFactors}} object \code{\linkS4class{mortalityTable.improvementFactors}} object
}} }}
\examples{ \examples{
pensionTables.load("USA_PensionPlan_RP2014") pensionTables.load("USA_PensionPlan_RP2014")
calculateImprovements(RP2014.male, YOB = 2017) calculateImprovements(RP2014.male@qx, YOB = 2017)
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment