percentage_table <- SFS_data %>%
group_by(education) %>%
group_modify(~ data.frame(wealth_gap =
mean(filter(., gender == "Female")$wealth)/mean(filter(., gender == "Male")$wealth) - 1)) %>%
mutate(wealth_gap = label_percent(wealth_gap))
percentage_table
This code:
will not run due to the
label_percent(wealth_gap)function. Needs to be deleted.