Example: Setup and Excess Deaths

  • Install and load packages:

    #options(repos = c(CRAN = "https://cloud.r-project.org/"))
    #install.packages("hmsidwR")
    
    library(tidyverse)
    library(hmsidwR)
  • Filter Data:

    deaths_stroke <- hmsidwR::deaths2019 |>
        arrange(age) |>
        filter(location == "Global", str_detect(cause, "Stroke")) |>
        select(-location, -cause, -upper, -lower)
    
    deaths_stroke |> head()