Skip to content
Snippets Groups Projects
Commit fa7038ad authored by Reinhold Kainhofer's avatar Reinhold Kainhofer
Browse files

Start adding examples to the function documentation (as requested for CRAN)

parent 95cd06a0
No related branches found
No related tags found
No related merge requests found
...@@ -7,6 +7,12 @@ NULL ...@@ -7,6 +7,12 @@ NULL
#' @param ... Other parameters (currently unused) #' @param ... Other parameters (currently unused)
#' @param YOB The birth year for which the age shift should be determined. #' @param YOB The birth year for which the age shift should be determined.
#' #'
#' @examples
#' mortalityTables.load("Austria_Annuities")
#' ageShift(AVOe2005R.male.av, YOB=1910)
#' ageShift(AVOe2005R.male.av, YOB=1955)
#' ageShift(AVOe2005R.male.av, YOB=2010)
#'
#' @exportMethod ageShift #' @exportMethod ageShift
setGeneric("ageShift", function(object, YOB=1975, ...) standardGeneric("ageShift")); setGeneric("ageShift", function(object, YOB=1975, ...) standardGeneric("ageShift"));
......
...@@ -6,9 +6,16 @@ NULL ...@@ -6,9 +6,16 @@ NULL
#' @param object A life table object (instance of a \code{\linkS4class{mortalityTable}} class) #' @param object A life table object (instance of a \code{\linkS4class{mortalityTable}} class)
#' @param ... Currently unused #' @param ... Currently unused
#' #'
#' @examples
#' mortalityTables.load("Austria_*", wildcard=TRUE)
#' ages(AVOe2005R.male)
#' ages(AVOe1996R.male)
#' ages(mort.AT.census.2011.male)
#'
#' @exportMethod ages #' @exportMethod ages
setGeneric("ages", function(object, ...) standardGeneric("ages")); setGeneric("ages", function(object, ...) standardGeneric("ages"));
#' @describeIn ages Return the defined ages of the period life table #' @describeIn ages Return the defined ages of the period life table
setMethod("ages", "mortalityTable.period", setMethod("ages", "mortalityTable.period",
function (object, ...) { function (object, ...) {
......
...@@ -6,6 +6,10 @@ NULL ...@@ -6,6 +6,10 @@ NULL
#' @param object The life table object (class inherited from mortalityTable) #' @param object The life table object (class inherited from mortalityTable)
#' @param ... Other parameters (currently unused) #' @param ... Other parameters (currently unused)
#' #'
#' @examples
#' mortalityTables.load("Austria_Annuities")
#' baseTable(AVOe2005R.male)
#'
#' @exportMethod baseTable #' @exportMethod baseTable
setGeneric("baseTable", function(object, ...) standardGeneric("baseTable")); setGeneric("baseTable", function(object, ...) standardGeneric("baseTable"));
......
...@@ -6,6 +6,10 @@ NULL ...@@ -6,6 +6,10 @@ NULL
#' @param object The life table object (class inherited from mortalityTable) #' @param object The life table object (class inherited from mortalityTable)
#' @param ... Other parameters (currently unused) #' @param ... Other parameters (currently unused)
#' #'
#' @examples
#' mortalityTables.load("Austria_Annuities")
#' baseYear(AVOe2005R.male)
#'
#' @exportMethod baseYear #' @exportMethod baseYear
setGeneric("baseYear", function(object, ...) standardGeneric("baseYear")); setGeneric("baseYear", function(object, ...) standardGeneric("baseYear"));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment