Derivation
num_adults in main_wb_Eng comes from the same indata_wb_Eng source. After grouping rows by ID00, we count all individuals aged 18 or older (D6 >= 18). In R, this was implemented as:
indata_wb_Eng %>%
group_by(ID00) %>%
summarise(num_adults = sum(D6 >= 18))