I have the following data:
> dput(df) structure(list(id = c(1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3), week = c(1, 2, 3, 4, 5, 6, 7, 8, 1, 2, 3,