Convert single age groups to five-year group abridged
single2abridged(Age)
Age | a numeric vector with counts for age groups. These are assumed to begin at zero. |
---|
A numeric vector with five-year age groups abridged
pop_male_counts <- c( `0` = 11684, `1` = 11473, `2` = 11647, `3` = 11939, `4` = 11680, `5` = 10600, `6` = 11100, `7` = 11157, `8` = 11238, `9` = 11544, `10` = 7216, `11` = 7407, `12` = 7461, `13` = 7656, `14` = 7774, `15` = 5709, `16` = 5629, `17` = 5745, `18` = 6056, `19` = 6259, `20` = 5303, `21` = 5423, `22` = 5497, `23` = 5547, `24` = 5417, `25` = 5441, `26` = 5466, `27` = 5500, `28` = 5668, `29` = 5694, `30` = 4365, `31` = 4252, `32` = 4122, `33` = 4142, `34` = 4039, `35` = 3210, `36` = 3222, `37` = 3258, `38` = 3413, `39` = 3871, `40` = 2684, `41` = 2844, `42` = 3052, `43` = 3182, `44` = 3237, `45` = 2263, `46` = 2298, `47` = 2318, `48` = 2257, `49` = 2194, `50` = 2231, `51` = 2172, `52` = 2072, `53` = 2008, `54` = 1932, `55` = 1301, `56` = 1262, `57` = 1213, `58` = 1197, `59` = 1191, `60` = 1601, `61` = 1593, `62` = 1490, `63` = 1348, `64` = 1299, `65` = 568, `66` = 745, `67` = 843, `68` = 801, `69` = 925, `70` = 806, `71` = 883, `72` = 796, `73` = 725, `74` = 672, `75` = 470, `76` = 441, `77` = 340, `78` = 300, `79` = 289, `80` = 4200 ) pop_female_counts <- c( `0` = 11673, `1` = 11474, `2` = 11670, `3` = 11934, `4` = 11614, `5` = 10603, `6` = 11144, `7` = 11179, `8` = 11269, `9` = 11617, `10` = 6772, `11` = 6948, `12` = 7030, `13` = 7211, `14` = 7306, `15` = 6531, `16` = 6443, `17` = 6535, `18` = 6951, `19` = 7213, `20` = 6096, `21` = 6234, `22` = 6327, `23` = 6410, `24` = 6285, `25` = 6464, `26` = 6492, `27` = 6549, `28` = 6739, `29` = 6795, `30` = 5013, `31` = 4888, `32` = 4735, `33` = 4747, `34` = 4646, `35` = 3040, `36` = 3068, `37` = 3107, `38` = 3246, `39` = 3658, `40` = 2650, `41` = 2788, `42` = 2977, `43` = 3108, `44` = 3156, `45` = 1756, `46` = 1784, `47` = 1802, `48` = 1764, `49` = 1724, `50` = 1982, `51` = 1935, `52` = 1846, `53` = 1795, `54` = 1731, `55` = 863, `56` = 850, `57` = 825, `58` = 819, `59` = 816, `60` = 1348, `61` = 1342, `62` = 1246, `63` = 1138, `64` = 1101, `65` = 391, `66` = 520, `67` = 585, `68` = 560, `69` = 659, `70` = 670, `71` = 750, `72` = 686, `73` = 634, `74` = 604, `75` = 353, `76` = 340, `77` = 270, `78` = 246, `79` = 247, `80` = 4143 ) single2abridged(pop_male_counts)#> 0 1 5 10 15 20 25 30 35 40 45 50 55 #> 11684 46739 55639 37514 29398 27187 27769 20920 16974 14999 11330 10415 6164 #> 60 65 70 75 80 #> 7331 3882 3882 1840 4200