Code
prc_hpi_inw %>%
left_join(purchase, by = "purchase") %>%
group_by(purchase, Purchase) %>%
summarise(Nobs = n()) %>%
arrange(-Nobs) %>%
{if (is_html_output()) print_table(.) else .}| purchase | Purchase | Nobs |
|---|---|---|
| TOTAL | Total | 664 |
| DW_EXST | Purchases of existing dwellings | 629 |
| DW_NEW | Purchases of newly built dwellings | 629 |