inst/script/make-death_prob.R

# import SSA period life expectancy tables
library(tidyverse)
death_prob <- read.csv("inst/extdata/ssa-death-probability.csv")
death_prob <- select(death_prob, "Age", "Sex", "DeathProb") %>%
  setNames(tolower(names(.))) %>%
  rename(prob = deathprob)

save(death_prob, file = "data/death_prob.rda", compress = "xz")

Try the dslabs package in your browser

Any scripts or data that you put into this service are public.

dslabs documentation built on May 29, 2024, 6:29 a.m.