Skip to content

Open interval #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Open interval #1

wants to merge 4 commits into from

Conversation

krpaulson
Copy link
Collaborator

This PR does the following for the period life table example:

  1. Starts with deaths and population instead of Mx
  2. Aggregates oldest age groups to a 95+ open age interval
  3. Modifies ax, qx, Lx computation for open age interval
  4. Adds kable() function call to create Table 2

@krpaulson krpaulson requested review from jlgodwin and nmmarquez March 31, 2025 19:11
@e-kotov e-kotov requested review from e-kotov and Copilot May 6, 2025 15:46
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review any files in this pull request.

Files not reviewed (1)
  • R/life-tables.R: Language not supported


d <- Mx |>
Deaths <- read_table(
"https://www.prdh.umontreal.ca/BDLC/data/ont/Deaths_5x1.txt",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How sustainable is this and all other links to prhd.umontreal.ca ? Could it happen that the data will be gone in, say, 5 years? Or if the university decides to change the link structure? So perhaps we would like to keep the data in the repository?

library(kableExtra)
lt_2015 |>
select(Age = age, x, n, Mx, ax, qx, px, lx, dx, Lx, Tx, ex) |>
kable(format = "latex", booktabs = T,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why only this specific table is with format='latex? All other tables in this R script are printed with default output.

Also, perhaps, since we are saving figures to plots folder, we should also save tables as PDF or HTML files that can be (1) recreated and (2) viewed when we run the repo in Binder and run this script.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants