Skip to content

Instantly share code, notes, and snippets.

@seabbs
Created November 15, 2017 15:18
Show Gist options
  • Save seabbs/a6d524b0e6f28ee2bedd58c02970e6d4 to your computer and use it in GitHub Desktop.
Save seabbs/a6d524b0e6f28ee2bedd58c02970e6d4 to your computer and use it in GitHub Desktop.
Spread annual change in nots by year
age_groups <- tibble(age_groups = c("15-19 years",
"20-24 years", "25-29 years"), key = 1)
nots_by_age <- nots %>%
mutate(key = 1) %>%
left_join(age_groups, by = "key") %>%
select(-key, -prev_year_m, -measure, -prop_decrease_sample) %>%
spread(key = "age_groups", value = "prop_decrease_sample")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment