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
0c05d743
Commit
0c05d743
authored
7 years ago
by
Reinhold Kainhofer
Browse files
Options
Downloads
Patches
Plain Diff
Allow lists of mortality tables to be passed to plotMortalityTables
parent
2dd8ac4e
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
R/makeQxDataFrame.R
+4
-2
4 additions, 2 deletions
R/makeQxDataFrame.R
with
4 additions
and
2 deletions
R/makeQxDataFrame.R
+
4
−
2
View file @
0c05d743
...
@@ -19,12 +19,14 @@
...
@@ -19,12 +19,14 @@
#'
#'
#' @export
#' @export
makeQxDataFrame
=
function
(
...
,
YOB
=
1972
,
Period
=
NA
,
reference
=
NULL
)
{
makeQxDataFrame
=
function
(
...
,
YOB
=
1972
,
Period
=
NA
,
reference
=
NULL
)
{
# If reference is given, normalize all probabilities by that table!
# Allow lists of tables to be passed, too. unlist should always return
data
=
list
(
...
);
# a list of tables, if if nested lists or only tables are passed as arguments!
data
=
unlist
(
list
(
...
));
names
(
data
)
=
lapply
(
data
,
function
(
t
)
t
@
name
);
names
(
data
)
=
lapply
(
data
,
function
(
t
)
t
@
name
);
reference_ages
=
NULL
;
reference_ages
=
NULL
;
if
(
missing
(
Period
))
{
if
(
missing
(
Period
))
{
# If reference is given, normalize all probabilities by that table!
if
(
!
missing
(
reference
))
{
if
(
!
missing
(
reference
))
{
reference_ages
=
ages
(
reference
);
reference_ages
=
ages
(
reference
);
reference
=
deathProbabilities
(
reference
,
YOB
=
YOB
);
reference
=
deathProbabilities
(
reference
,
YOB
=
YOB
);
...
...
This diff is collapsed.
Click to expand it.
Reinhold Kainhofer
@reinhold
mentioned in issue
#6 (closed)
·
7 years ago
mentioned in issue
#6 (closed)
mentioned in issue #6
Toggle commit list
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