Code
demo_r_mwk3_20 %>%
left_join(age, by = "age") %>%
group_by(age, Age) %>%
summarise(Nobs = n()) %>%
arrange(-Nobs) %>%
{if (is_html_output()) print_table(.) else .}| age | Age | Nobs |
|---|---|---|
| TOTAL | Total | 3946022 |
| Y_GE80 | 80 years or over | 3915378 |
| Y60-79 | From 60 to 79 years | 3915108 |
| Y40-59 | From 40 to 59 years | 3913053 |
| Y20-39 | From 20 to 39 years | 3912150 |
| Y_LT20 | Less than 20 years | 3911920 |
| UNK | Unknown | 3835546 |