I want to see the attrition/growth level of groups' members by group in R.
My data:
year1 <-
tibble(people = c("Joe A", "Max X", "Sam M", "Jane K", "Doug K"), group = c(1, 1, 1, 2, 2))
year1 <-
tibble(people = c("Joe A", "Sam M", "Jane K", "Doug K", "Mike K", "Jen G", "Mohamad T"), group = c(1, 1, 1, 2, 2, 2, 2))
- Group 1 lost Max but gained Jane that moved from group 2.
- Group 2 lost Jane but gained Mohamad
Is there a way to see how many people joined/left a group in each year and the percentage change from year to year?