library(dplyr)
d <- alabama_1970 %>%
group_by(race, sex) %>%
summarise(births = sum(pop_1960[1:2]),
pop_1960 = sum(pop_1960) - births,
pop_1970 = sum(pop_1970)) %>%
ungroup()
d
d %>%
mutate(deaths = c(51449, 58845, 86880, 123220)) %>%
net_vs(pop0_col = "pop_1960", pop1_col = "pop_1970")
Run the code above in your browser using DataLab