N_ALTERSRENTEN <- p_dat %>% 
  filter(type == "alt", year %in% 2009:2040) %>% 
  dplyr::summarize(n = sum(n), .by = "year")
