Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
R - Mortality Tables
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
R
R - Mortality Tables
Commits
d8adcdc7
Commit
d8adcdc7
authored
7 years ago
by
Reinhold Kainhofer
Browse files
Options
Downloads
Patches
Plain Diff
ageShift: Return NA for mortalityTables without age shift
parent
e6ec9ce1
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
R/ageShift.R
+8
-0
8 additions, 0 deletions
R/ageShift.R
man/ageShift.Rd
+8
-0
8 additions, 0 deletions
man/ageShift.Rd
with
16 additions
and
0 deletions
R/ageShift.R
+
8
−
0
View file @
d8adcdc7
...
...
@@ -12,10 +12,18 @@ NULL
#' ageShift(AVOe2005R.male.av, YOB=1910)
#' ageShift(AVOe2005R.male.av, YOB=1955)
#' ageShift(AVOe2005R.male.av, YOB=2010)
#' # A table with trend does NOT have any age shift, so NA is returned:
#' ageShift(AVOe2005R.male, YOB=1910)
#'
#' @exportMethod ageShift
setGeneric
(
"ageShift"
,
function
(
object
,
YOB
=
1975
,
...
)
standardGeneric
(
"ageShift"
));
#' @describeIn ageShift Age shifts apply only to mortalityTagle.ageShift, so
#' all other tables return NA.
setMethod
(
"ageShift"
,
"mortalityTable"
,
function
(
object
,
YOB
,
...
)
{
NA
})
#' @describeIn ageShift Return the age shift of the age-shifted life table
#' given the birth year
setMethod
(
"ageShift"
,
...
...
This diff is collapsed.
Click to expand it.
man/ageShift.Rd
+
8
−
0
View file @
d8adcdc7
...
...
@@ -3,11 +3,14 @@
\docType{methods}
\name{ageShift}
\alias{ageShift}
\alias{ageShift,mortalityTable-method}
\alias{ageShift,mortalityTable.ageShift-method}
\title{Return the age shift of the age-shifted life table given the birth year}
\usage{
ageShift(object, YOB = 1975, ...)
\S4method{ageShift}{mortalityTable}(object, YOB = 1975, ...)
\S4method{ageShift}{mortalityTable.ageShift}(object, YOB = 1975, ...)
}
\arguments{
...
...
@@ -22,6 +25,9 @@ Return the age shift of the age-shifted life table given the birth year
}
\section{Methods (by class)}{
\itemize{
\item \code{mortalityTable}: Age shifts apply only to mortalityTagle.ageShift, so
all other tables return NA.
\item \code{mortalityTable.ageShift}: Return the age shift of the age-shifted life table
given the birth year
}}
...
...
@@ -31,5 +37,7 @@ mortalityTables.load("Austria_Annuities")
ageShift(AVOe2005R.male.av, YOB=1910)
ageShift(AVOe2005R.male.av, YOB=1955)
ageShift(AVOe2005R.male.av, YOB=2010)
# A table with trend does NOT have any age shift, so NA is returned:
ageShift(AVOe2005R.male, YOB=1910)
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment