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 | 3936369 |
| Y_GE80 | 80 years or over | 3905325 |
| Y60-79 | From 60 to 79 years | 3905055 |
| Y40-59 | From 40 to 59 years | 3903000 |
| Y20-39 | From 20 to 39 years | 3902097 |
| Y_LT20 | Less than 20 years | 3901867 |
| UNK | Unknown | 3825493 |