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 | 3925440 |
| Y_GE80 | 80 years or over | 3894573 |
| Y60-79 | From 60 to 79 years | 3894390 |
| Y40-59 | From 40 to 59 years | 3892977 |
| Y20-39 | From 20 to 39 years | 3892359 |
| Y_LT20 | Less than 20 years | 3892175 |
| UNK | Unknown | 3815772 |